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.
anag_user
Posts: 2 Joined: Mon Apr 04, 2011 7:57 am
Post
by anag_user » Mon Apr 04, 2011 8:17 am
Hello,
Could you help me please ? I would like to use smart plugin (
https://www.monitoringexchange.org/inve ... ART-status ) but it returns me a unknow status on nagios.
Code: Select all
smart UNKNOWN 2011-04-04 15:10:52 5d 21h 56m 52s 3/3 **ePN /usr/lib/nagios/plugins/check_smart: ###########################################################".
This the command definition : /etc/nagios-plugins/config/smart.cfg
Code: Select all
define command{
command_name check_smart
command_line /usr/lib/nagios/plugins/check_smart -d /dev/sda -i ata --debug
}
This is my /etc/nagios3/conf.d/generic-service_nagios2.cfg file :
Code: Select all
define service{
[...]
check_command check_smart!/dev/sda!ata
}
Any ideas ?
Thanks.
mguthrie
Posts: 4380 Joined: Mon Jun 14, 2010 10:21 am
Post
by mguthrie » Mon Apr 04, 2011 8:03 pm
Can you test the full command directly from the command-line and display the both what was input and the output from it?
if your script is erroring out unexpectedly you're likely to get an unknown error code.
Does your script exit with an exit code, such as exit(0), exit(1), exit(2)?
If you're still stuck you can post the code and we'll see if we can find the problem.
anag_user
Posts: 2 Joined: Mon Apr 04, 2011 7:57 am
Post
by anag_user » Tue Apr 05, 2011 2:22 am
Thanks for helping me
I resolved the issue yesterday.
I set a sudo before my command :
Code: Select all
define command{
command_name check_smart
command_line sudo /usr/lib/nagios/plugins/check_smart -d /dev/sda -i ata
}
But now, Nagios returns me this :
Code: Select all
smart WARNING 2011-04-05 09:14:28 0d 17h 39m 21s 3/3 (null)
It bothers me that there is "null" as informations. I would like to have more details. It's the case when I run my command in the shell ( see below )
Input :
Code: Select all
$ /usr/lib/nagios/plugins/check_smart -d /dev/sda -i ata
Output :
Code: Select all
WARNING: Sectors pending re-allocation|Spin_Up_Time=14169 Start_Stop_Count=117 Reallocated_Sector_Ct=6 Read_Channel_Margin=0 Seek_Error_Rate=0 Seek_Time_Performance=46981 Spin_Retry_Count=0 Calibration_Retry_Count=0 Power_Cycle_Count=161 Power-Off_Retract_Count=0 Load_Cycle_Count=0 Temperature_Celsius=25 Hardware_ECC_Recovered=558 Reallocated_Event_Count=0 Current_Pending_Sector=1 Offline_Uncorrectable=0 UDMA_CRC_Error_Count=0 Multi_Zone_Error_Rate=0 Soft_Read_Error_Rate=14 TA_Increase_Count=5 Run_Out_Cancel=944 Shock_Count_Write_Opern=0 Shock_Rate_Write_Opern=0 Spin_High_Current=0 Spin_Buzz=0 Offline_Seek_Performnce=0
Thanks !