Can't detect all disk

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Can't detect all disk

Post by pianunix »

Hi,

Today i was trying to detect all the disk drive using plugin check_usolved_disks,

./check_usolved_disks -H localhost -C public -w 90 -c 95
./check_usolved_disks: line 6: syntax error near unexpected token `newline'
./check_usolved_disks: line 6: `<!DOCTYPE html>'

ref: http://exchange.nagios.org/directory/Pl ... ks/details

Please give me a clue for this ?

Thanks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Can't detect all disk

Post by Box293 »

It's more than likely that you've copied and pasted the plugin from the website and have included the HTML content.

From this URL:
https://github.com/usolved/check_usolve ... _disks.php
I was able to select all the text on screen, copy it and paste it into a file and then upload that file to my nagios host and it worked OK.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Can't detect all disk

Post by pianunix »

HI,

I've tried to, but still no get results

Code: Select all

./check_usolved_disks.php -H localhost -C public -V 2 -w 90 -c 95 _P yes       
:/usr/lib/nagios/plugins# 
Another solution about this ?

Thx
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Can't detect all disk

Post by Box293 »

Please upload the plugin here (check_usolved_disks.php), rename it as a text file first.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Can't detect all disk

Post by pianunix »

Hi,

Here is my configuration file
Attachments
check_usolved.txt
(13.75 KiB) Downloaded 272 times
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Can't detect all disk

Post by lmiltchev »

Try running this:

Code: Select all

./check_usolved_disks.php -H localhost -C public -V 2c -w 90 -c 95 -P
Also, check if snmpd is running:

Code: Select all

service snmpd status
Be sure to check out our Knowledgebase for helpful articles and solutions!
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Can't detect all disk

Post by pianunix »

^ Nothing happen.

Fyi i'm using debian squeeze on the server right know.

Thanks
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Can't detect all disk

Post by sreinhardt »

Are you able to query snmp locally?

Code: Select all

nmap -sU -p 162 localhost
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Can't detect all disk

Post by pianunix »

Yes we can,

Code: Select all

 nmap -sU -p 162 localhost

Starting Nmap 5.00 ( http://nmap.org ) at 2014-08-04 10:39 
Interesting ports on localhost (127.0.0.1):
PORT    STATE  SERVICE
162/udp closed snmptrap

Nmap done: 1 IP address (1 host up) scanned in 0.24 seconds
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't detect all disk

Post by tmcdonald »

I believe that was supposed to be port 161:

Code: Select all

nmap -sU -p 161 localhost
Sorry for the confusion. And what was the output of this command?

Code: Select all

service snmpd status
Former Nagios employee
Locked