Status Information:DISK UNKNOWN
Status Information:DISK UNKNOWN
Hi
I am new to nagios and I have setup nagios core server and I am using nrpe for client monitoring. I have download check_disk_snmp plugin from nagios site and it working thru command line but in my web interface showing unknown disk.
From nagios server I can run this command to client.
[root@sove1 ~]# /usr/local/nagios/libexec/check_disk_snmp -t 10.128.xxx.xx -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
where 10.128.xxx.xx is my client IP
Above script is perl script and use snmpwalk command and gather information from remote client.
Can some one please tell me what is correct format that nagios core will accept information from plugin.
Thanks
Sanjay
I am new to nagios and I have setup nagios core server and I am using nrpe for client monitoring. I have download check_disk_snmp plugin from nagios site and it working thru command line but in my web interface showing unknown disk.
From nagios server I can run this command to client.
[root@sove1 ~]# /usr/local/nagios/libexec/check_disk_snmp -t 10.128.xxx.xx -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
where 10.128.xxx.xx is my client IP
Above script is perl script and use snmpwalk command and gather information from remote client.
Can some one please tell me what is correct format that nagios core will accept information from plugin.
Thanks
Sanjay
Re: Status Information:DISK UNKNOWN
I have enable debugging in nagios core and now I can see nagios core running same command and using same parameter which I have mentioned earlier but core is showing unknown status.
[1402333727.734899] [016.1] [pid=725] Checking host 'ginsftp01' for flapping...
[1402333756.719459] [008.0] [pid=725] ** Service Check Event ==> Host: 'ginsftp01', Service: 'SFTP Volume', Options: 0, Latency: 0.000000 sec
[1402333756.719483] [016.0] [pid=725] Attempting to run scheduled check of service 'SFTP Volume' on host 'ginsftp01': check options=0, latency=0.000000
[1402333756.719593] [016.0] [pid=725] Checking service 'SFTP Volume' on host 'ginsftp01'...
[1402333756.719811] [2048.1] [pid=725] Processing: ''/sftp''
[1402333756.719819] [2048.1] [pid=725] Done. Final output: ''/sftp''
[1402333756.719867] [2048.1] [pid=725] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp''
[1402333756.814625] [016.0] [pid=725] ** Handling check result for service 'SFTP Volume' on host 'ginsftp01' from 'Core Worker 733'...
[1402333756.814637] [016.1] [pid=725] HOST: ginsftp01, SERVICE: SFTP Volume, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 3, OUTPUT: DISK UNKNOWN
[1402333756.814705] [016.0] [pid=725] Scheduling a non-forced, active check of host 'ginsftp01' @ Mon Jun 9 18:09:16 2014
[1402333756.814812] [016.1] [pid=725] Checking service 'SFTP Volume' on host 'ginsftp01' for flapping...
[1402333756.814853] [016.1] [pid=725] Checking host 'ginsftp01' for flapping...
My hosts.cfg files are mentioned below
define service{
use generic-service ; Name of service template to use
host_name ginsftp01
service_description SFTP Volume
check_command check_disk_snmp!85%!95%!'^/'!'/sftp'
}
command.cfg file
define command{
command_name check_disk_snmp
command_line $USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4$
}
Please help me
Thanks
Sanjay
[1402333727.734899] [016.1] [pid=725] Checking host 'ginsftp01' for flapping...
[1402333756.719459] [008.0] [pid=725] ** Service Check Event ==> Host: 'ginsftp01', Service: 'SFTP Volume', Options: 0, Latency: 0.000000 sec
[1402333756.719483] [016.0] [pid=725] Attempting to run scheduled check of service 'SFTP Volume' on host 'ginsftp01': check options=0, latency=0.000000
[1402333756.719593] [016.0] [pid=725] Checking service 'SFTP Volume' on host 'ginsftp01'...
[1402333756.719811] [2048.1] [pid=725] Processing: ''/sftp''
[1402333756.719819] [2048.1] [pid=725] Done. Final output: ''/sftp''
[1402333756.719867] [2048.1] [pid=725] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp''
[1402333756.814625] [016.0] [pid=725] ** Handling check result for service 'SFTP Volume' on host 'ginsftp01' from 'Core Worker 733'...
[1402333756.814637] [016.1] [pid=725] HOST: ginsftp01, SERVICE: SFTP Volume, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 3, OUTPUT: DISK UNKNOWN
[1402333756.814705] [016.0] [pid=725] Scheduling a non-forced, active check of host 'ginsftp01' @ Mon Jun 9 18:09:16 2014
[1402333756.814812] [016.1] [pid=725] Checking service 'SFTP Volume' on host 'ginsftp01' for flapping...
[1402333756.814853] [016.1] [pid=725] Checking host 'ginsftp01' for flapping...
My hosts.cfg files are mentioned below
define service{
use generic-service ; Name of service template to use
host_name ginsftp01
service_description SFTP Volume
check_command check_disk_snmp!85%!95%!'^/'!'/sftp'
}
command.cfg file
define command{
command_name check_disk_snmp
command_line $USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4$
}
Please help me
Thanks
Sanjay
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Status Information:DISK UNKNOWN
Hi Sanjay,
I have a feeling that the /sftp disk is not mounted for the user nagios (or nagios doesn't have permission to it).
I notice you are executing your tests on the CLI as root. When Nagios executes checks it does it as the user nagios.
Test your command as follows:
Do you get the DISK UNKNOWN error now? if so, resolve the problem with the nagios user not seeing /sftp.
I have a feeling that the /sftp disk is not mounted for the user nagios (or nagios doesn't have permission to it).
I notice you are executing your tests on the CLI as root. When Nagios executes checks it does it as the user nagios.
Test your command as follows:
Code: Select all
[root@sove1 libexec]# su - nagios
[nagios@sove1 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.xxx.xx -w 85% -c 95% -p public -x '^/' -i '/sftp'As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Status Information:DISK UNKNOWN
Hi
su - nagios
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
No log handling enabled - turning on stderr logging
snmpwalk: No securityName specified (Sub-id not found: (top) -> hrStorage)
DISK UNKNOWN
In my earlier post you can see nagios core is getting same out put but it good finding.
Thanks
Sanjay
su - nagios
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
No log handling enabled - turning on stderr logging
snmpwalk: No securityName specified (Sub-id not found: (top) -> hrStorage)
DISK UNKNOWN
In my earlier post you can see nagios core is getting same out put but it good finding.
Thanks
Sanjay
Re: Status Information:DISK UNKNOWN
Hi
I have sort out this issue and now put is same as above
[nagios@sov-srv-negios01 .snmp]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
[nagios@sov-srv-negios01 .snmp]$
Sanajy
I have sort out this issue and now put is same as above
[nagios@sov-srv-negios01 .snmp]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
[nagios@sov-srv-negios01 .snmp]$
Sanajy
Re: Status Information:DISK UNKNOWN
Hi
I have enable debugging and run the same command so more details log
[1402389660.465478] [016.0] [pid=6490] Attempting to run scheduled check of service 'SFTP' on host 'ginsftp01': check options=0, latency=0.000000
[1402389660.465485] [001.0] [pid=6490] run_async_service_check()
[1402389660.465491] [001.0] [pid=6490] check_service_check_viability()
[1402389660.465497] [001.0] [pid=6490] check_time_against_period()
[1402389660.465507] [001.0] [pid=6490] _get_matching_timerange()
[1402389660.465516] [001.0] [pid=6490] check_service_dependencies()
[1402389660.465524] [064.1] [pid=6490] Making callbacks (type 6)...
[1402389660.465530] [016.0] [pid=6490] Checking service 'SFTP' on host 'ginsftp01'...
[1402389660.465538] [001.0] [pid=6490] get_raw_command_line_r()
[1402389660.465545] [001.0] [pid=6490] process_macros_r()
[1402389660.465551] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465557] [2048.1] [pid=6490] Processing: '80%'
[1402389660.465564] [2048.1] [pid=6490] Done. Final output: '80%'
[1402389660.465570] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465575] [001.0] [pid=6490] process_macros_r()
[1402389660.465581] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465586] [2048.1] [pid=6490] Processing: '90%'
[1402389660.465592] [2048.1] [pid=6490] Done. Final output: '90%'
[1402389660.465598] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465603] [001.0] [pid=6490] process_macros_r()
[1402389660.465608] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465613] [2048.1] [pid=6490] Processing: ''^/''
[1402389660.465619] [2048.1] [pid=6490] Done. Final output: ''^/''
[1402389660.465625] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465630] [001.0] [pid=6490] process_macros_r()
[1402389660.465636] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465641] [2048.1] [pid=6490] Processing: ''/sftp''
[1402389660.465647] [2048.1] [pid=6490] Done. Final output: ''/sftp''
[1402389660.465652] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465658] [001.0] [pid=6490] process_macros_r()
[1402389660.465663] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465668] [2048.1] [pid=6490] Processing: '$USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4'
[1402389660.465694] [2048.1] [pid=6490] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 80% -c 90% -p public -x '^/' -i '/sftp''
[1402389660.465701] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465709] [064.1] [pid=6490] Making callbacks (type 6)...
[1402389660.465722] [001.0] [pid=6490] macros_to_kvv()
[1402389660.465764] [001.0] [pid=6490] clear_volatile_macros_r()
[1402389660.465776] [001.0] [pid=6490] handle_timed_event() end
[1402389660.465784] [064.1] [pid=6490] Making callbacks (type 1)...
[1402389660.465792] [008.1] [pid=6490] ** Event Check Loop
[1402389660.465806] [008.1] [pid=6490] Next Event Time: Tue Jun 10 09:41:04 2014
[1402389660.465813] [008.1] [pid=6490] Current/Max Service Checks: 1/0 (inf% saturation)
[1402389660.465821] [12288.1] [pid=6490] ## Polling 1500ms; sockets=14; events=28; iobs=0x1ff1140
[1402389660.558116] [001.0] [pid=6490] handle_async_service_check_result()
[1402389660.558146] [016.0] [pid=6490] ** Handling check result for service 'SFTP' on host 'ginsftp01' from 'Core Worker 6502'...
[1402389660.558156] [016.1] [pid=6490] HOST: ginsftp01, SERVICE: SFTP, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 3, OUTPUT: DISK UNKNOWN
I have enable debugging and run the same command so more details log
[1402389660.465478] [016.0] [pid=6490] Attempting to run scheduled check of service 'SFTP' on host 'ginsftp01': check options=0, latency=0.000000
[1402389660.465485] [001.0] [pid=6490] run_async_service_check()
[1402389660.465491] [001.0] [pid=6490] check_service_check_viability()
[1402389660.465497] [001.0] [pid=6490] check_time_against_period()
[1402389660.465507] [001.0] [pid=6490] _get_matching_timerange()
[1402389660.465516] [001.0] [pid=6490] check_service_dependencies()
[1402389660.465524] [064.1] [pid=6490] Making callbacks (type 6)...
[1402389660.465530] [016.0] [pid=6490] Checking service 'SFTP' on host 'ginsftp01'...
[1402389660.465538] [001.0] [pid=6490] get_raw_command_line_r()
[1402389660.465545] [001.0] [pid=6490] process_macros_r()
[1402389660.465551] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465557] [2048.1] [pid=6490] Processing: '80%'
[1402389660.465564] [2048.1] [pid=6490] Done. Final output: '80%'
[1402389660.465570] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465575] [001.0] [pid=6490] process_macros_r()
[1402389660.465581] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465586] [2048.1] [pid=6490] Processing: '90%'
[1402389660.465592] [2048.1] [pid=6490] Done. Final output: '90%'
[1402389660.465598] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465603] [001.0] [pid=6490] process_macros_r()
[1402389660.465608] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465613] [2048.1] [pid=6490] Processing: ''^/''
[1402389660.465619] [2048.1] [pid=6490] Done. Final output: ''^/''
[1402389660.465625] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465630] [001.0] [pid=6490] process_macros_r()
[1402389660.465636] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465641] [2048.1] [pid=6490] Processing: ''/sftp''
[1402389660.465647] [2048.1] [pid=6490] Done. Final output: ''/sftp''
[1402389660.465652] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465658] [001.0] [pid=6490] process_macros_r()
[1402389660.465663] [2048.1] [pid=6490] **** BEGIN MACRO PROCESSING ***********
[1402389660.465668] [2048.1] [pid=6490] Processing: '$USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4'
[1402389660.465694] [2048.1] [pid=6490] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 80% -c 90% -p public -x '^/' -i '/sftp''
[1402389660.465701] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
[1402389660.465709] [064.1] [pid=6490] Making callbacks (type 6)...
[1402389660.465722] [001.0] [pid=6490] macros_to_kvv()
[1402389660.465764] [001.0] [pid=6490] clear_volatile_macros_r()
[1402389660.465776] [001.0] [pid=6490] handle_timed_event() end
[1402389660.465784] [064.1] [pid=6490] Making callbacks (type 1)...
[1402389660.465792] [008.1] [pid=6490] ** Event Check Loop
[1402389660.465806] [008.1] [pid=6490] Next Event Time: Tue Jun 10 09:41:04 2014
[1402389660.465813] [008.1] [pid=6490] Current/Max Service Checks: 1/0 (inf% saturation)
[1402389660.465821] [12288.1] [pid=6490] ## Polling 1500ms; sockets=14; events=28; iobs=0x1ff1140
[1402389660.558116] [001.0] [pid=6490] handle_async_service_check_result()
[1402389660.558146] [016.0] [pid=6490] ** Handling check result for service 'SFTP' on host 'ginsftp01' from 'Core Worker 6502'...
[1402389660.558156] [016.1] [pid=6490] HOST: ginsftp01, SERVICE: SFTP, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 3, OUTPUT: DISK UNKNOWN
-
rajesh.mehra
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Status Information:DISK UNKNOWN
Hi
Have you configured argument $USER3$ in /usr/local/nagios/etc/resource.cfg.
Add this to resource.cfg
$USER3$=public
OR
Change according to below
1. Add "public" in service defination
2. Change $ARG$ parameters in commands .cfg
define service{
use generic-service ; Name of service template to use
host_name ginsftp01
service_description SFTP Volume
check_command check_disk_snmp!85%!95%!public!'^/'!'/sftp'
}
command.cfg file
define command{
command_name check_disk_snmp
command_line $USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $ARG3$ -x $ARG4$ -i $ARG5$
}
Tks
Rajesh Mehra
Have you configured argument $USER3$ in /usr/local/nagios/etc/resource.cfg.
Add this to resource.cfg
$USER3$=public
Change according to below
1. Add "public" in service defination
2. Change $ARG$ parameters in commands .cfg
define service{
use generic-service ; Name of service template to use
host_name ginsftp01
service_description SFTP Volume
check_command check_disk_snmp!85%!95%!public!'^/'!'/sftp'
}
command.cfg file
define command{
command_name check_disk_snmp
command_line $USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $ARG3$ -x $ARG4$ -i $ARG5$
}
Tks
Rajesh Mehra
Re: Status Information:DISK UNKNOWN
Hi
yes that line is already there and that reason core running below command.
[1402389660.465668] [2048.1] [pid=6490] Processing: '$USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4'
[1402389660.465694] [2048.1] [pid=6490] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 80% -c 90% -p public -x '^/' -i '/sftp''
[1402389660.465701] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
Thanks
Sanjay
yes that line is already there and that reason core running below command.
[1402389660.465668] [2048.1] [pid=6490] Processing: '$USER1$/check_disk_snmp -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4'
[1402389660.465694] [2048.1] [pid=6490] Done. Final output: '/usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 80% -c 90% -p public -x '^/' -i '/sftp''
[1402389660.465701] [2048.1] [pid=6490] **** END MACRO PROCESSING *************
Thanks
Sanjay
Re: Status Information:DISK UNKNOWN
Just to clarify, the command works as root from the cli:
Additionally, the following error:
Usually implies snmp v3. what version of the snmp plugin are you running?
But does not work as user nagios from the cli:sanjayk wrote: [root@sove1 ~]# /usr/local/nagios/libexec/check_disk_snmp -t 10.128.xxx.xx -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
As nagios runs the check as the user nagios, this would half explain your problems. What are the permissions on the script:sanjayk wrote:su - nagios
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
No log handling enabled - turning on stderr logging
snmpwalk: No securityName specified (Sub-id not found: (top) -> hrStorage)
DISK UNKNOWN
Code: Select all
ls -la /usr/local/nagios/libexec/check_disk_snmpCode: Select all
snmpwalk: No securityName specified (Sub-id not found: (top) -> hrStorage)Code: Select all
/usr/local/nagios/libexec/check_disk_snmp -VFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Status Information:DISK UNKNOWN
[root@sov-srv-negios01 ~]# su - nagios
[nagios@sov-srv-negios01 ~]$ ls -la /usr/local/nagios/libexec/check_disk_snmp
-rwxr-xr-x 1 nagios nagios 14451 Jun 9 16:44 /usr/local/nagios/libexec/check_disk_snmp
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -V
/usr/local/nagios/libexec/check_disk_snmp version 2.2 last updated 05.05.2010
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
[nagios@sov-srv-negios01 ~]$
[nagios@sov-srv-negios01 ~]$ ls -la /usr/local/nagios/libexec/check_disk_snmp
-rwxr-xr-x 1 nagios nagios 14451 Jun 9 16:44 /usr/local/nagios/libexec/check_disk_snmp
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -V
/usr/local/nagios/libexec/check_disk_snmp version 2.2 last updated 05.05.2010
[nagios@sov-srv-negios01 ~]$ /usr/local/nagios/libexec/check_disk_snmp -t 10.128.132.17 -w 85% -c 95% -p public -x '^/' -i '/sftp'
DISK OK - free space: /sftp 51.6gb;
[nagios@sov-srv-negios01 ~]$