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.
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 »

Can you post a screenshot or the full output including the command you typed (in a code block).
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 »

this is my commands.cfg

define command{
command_name check_snmp_synology
command_line $USER1$/check_snmp_synology -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}


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

}

define service{
Use generic-service
host_name Hostname
service_description System Fan Status
check_command check_synology!Check system Fan 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
}




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

This is what is showing on the nagios site. next to the service command is showing in error

(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_synology, ...) failed. errno is 2: No such file or directory
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 »

OK so I must re-iterate what I said earlier:
Box293 wrote:Before you worry about Nagios configurations you need to make sure the plugin runs from the command line first.
As per my instructions you need to execute the plugin in a terminal session on your Nagios Core server. This will show us if the plugin works, if it doesn't work we'll troubleshoot why.

After we know it works you will configure Nagios.
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 »

when i run this command

/usr/local/nagios/libexec/check_snmp_synology -2 public -h your_synology_ip_address

No such file or directory

permission denied
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 »

OK so it sounds like the plugin is not in that location.

What is the output of :

Code: Select all

ls -la /usr/local/nagios/libexec/check_snmp_synology
If you downloaded it to a different location then you will need to change that directory in the test command and try again.
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:OK so it sounds like the plugin is not in that location.

What is the output of :

Code: Select all

ls -la /usr/local/nagios/libexec/check_snmp_synology
If you downloaded it to a different location then you will need to change that directory in the test command and try again.

I get this

17585 may 21 13:08 /usr/local/nagios/libexec/check_snmp_synology

Note I just copied the file over and ran this command

chmod +x /usr/local/nagios/libexec/

Here is a screen shot
Attachments
Check_synology.PNG
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 »

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?
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: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?
after i made it executable i ran this

./check_snmp_synology -2 public -h Ipaddress

results

CRITICAL - Problem with SNMP request, check user/password/host
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Synology On Nagios Core

Post by hsmith »

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

Re: Synology On Nagios Core

Post by skypete »

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?
what do i have to add where it says option? thanks
Locked