Synology On Nagios Core

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.
skypete
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Synology On Nagios Core

Post by skypete »

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)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Synology On Nagios Core

Post by Box293 »

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
skypete
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Synology On Nagios Core

Post by skypete »

ok stand by gonna try now thanks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Synology On Nagios Core

Post by Box293 »

hsmith wrote:

Code: Select all

usage: ./check_snmp_synology [OPTION] -u [user] -p [pass] -h [hostname] 
Did you supply a username and password when you executed the command?
If he was using SNMP v3 then he would need this. My instructions have been showing him how to use SNMP v2 which does not require those options.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
skypete
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Synology On Nagios Core

Post by skypete »

no i did not know i just used the commmunity name from the synology I called HOSTNAME

I ran this command ./check_snmp_synology -2 HOSTNAME -h ipaddress -v
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Synology On Nagios Core

Post by Box293 »

skypete wrote:no i did not know i just used the commmunity name from the synology I called HOSTNAME
And this is working correctly, so disregard the username and password stuff, I was posting that response to clarify with @hsmith as to what is happening.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
skypete
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Synology On Nagios Core

Post by skypete »

Box293 wrote:
skypete wrote:no i did not know i just used the commmunity name from the synology I called HOSTNAME
And this is working correctly, so disregard the username and password stuff, I was posting that response to clarify with @hsmith as to what is happening.

No worries thanks also wanted to ask where would this be placed?

$USER1$/check_snmp_synology -2 $ARG1$ -h $HOSTADDRESS$ -v $ARG2$
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Synology On Nagios Core

Post by Box293 »

In your commands.cfg:

Code: Select all

define command{
command_name check_snmp_synology
command_line $USER1$/check_snmp_synology -2 $ARG1$ -h $HOSTADDRESS$ -v $ARG2$
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
skypete
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Synology On Nagios Core

Post by skypete »

Did everything you mentioned and not showing up in nagios web interface.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Synology On Nagios Core

Post by Box293 »

Did you restart the Nagios service?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked