skypete wrote:Box293 wrote:OK great, we now need to make it executable (I made a mistake with my original command):
Code: Select all
chmod +x /usr/local/nagios/libexec/check_snmp_synology
Now try and test the plugin, what output does it produce?
ok I ran this command
./check_snmp_synology -2 HOSTNAME -h ipaddress -v
Results
[root:/usr/local/nagios/libexec]$ ./check_snmp_synology -2 hostname -h ipadress -v
Synology model: "RS815+"
Synology s/n: "1123456"
DSM Version: "DSM 6.1-15152"
DSM update: Available
System Status: Normal
Temperature: 53 (WARNING)
Power Status: Normal
System Fan Status: Normal
CPU Fan Status: Normal
Number of disks: 4
"Disk 1" (model: ") status:Normal temperature:36
"Disk 2" (model: ") status:Normal temperature:37
"Disk 3" (model: ") status:Normal temperature:36
"Disk 4" (model: ") status:Initialized temperature:35
Number of RAID volume: 2
"Volume 1" status:Normal
"Disk Group 1" status:Normal
WARNING - Synology "RS815+" (s/n: "", "DSM 6.1-15152"), DSM update available, temperature: 53 (WARNING)
Excellent, the plugin is working, now we can move onto your Nagios configs.
skypete wrote:this is my commands.cfg
define command{
command_name check_snmp_synology
command_line $USER1$/check_snmp_synology -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}
Lets compare your command definition with what you typed in at the command line:
Code: Select all
./check_snmp_synology -2 HOSTNAME -h ipaddress -v
So I assume that
HOSTNAME is your SNMP community string. Update your command to include the SNMP community options. ALSO you need a lowercase
-h:
Code: Select all
$USER1$/check_snmp_synology -2 $ARG1$ -h $HOSTADDRESS$ -v $ARG2$
skypete wrote:This is my Service.cfg file
define host{
use dev
host_name Hostname
address 192.168.1.77:5000
max_check_attempts 3
check_interval 3
retry_interval 1
notifications_enabled 1
}
Your address of
192.168.1.77:5000 is not going to work with the plugin, you need to remove the
:5000.
skypete wrote:define service{
use generic-service
host_name Hostname
service_description Disk Status
check_command check_synology!Check all disk status
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
max_check_attempts 5
check_interval 5
retry_interval 1
Update your check_command to:
Code: Select all
check_command check_snmp_synology!HOSTNAME!
Where
HOSTNAME is your SNMP community string.
Save that and see how it goes.
Please respond with your updated configs and the output.
Also, when pasting code and configs use the
Code button above this text editor.