Page 3 of 6
Re: Synology On Nagios Core
Posted: Mon May 21, 2018 4:15 pm
by Box293
Can you post a screenshot or the full output including the command you typed (in a code block).
Re: Synology On Nagios Core
Posted: Mon May 21, 2018 4:49 pm
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
Re: Synology On Nagios Core
Posted: Mon May 21, 2018 7:50 pm
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.
Re: Synology On Nagios Core
Posted: Tue May 22, 2018 9:26 am
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
Re: Synology On Nagios Core
Posted: Tue May 22, 2018 4:33 pm
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.
Re: Synology On Nagios Core
Posted: Tue May 22, 2018 5:18 pm
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
Re: Synology On Nagios Core
Posted: Tue May 22, 2018 11:17 pm
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?
Re: Synology On Nagios Core
Posted: Wed May 23, 2018 8:58 am
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
Re: Synology On Nagios Core
Posted: Wed May 23, 2018 10:30 am
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?
Re: Synology On Nagios Core
Posted: Wed May 23, 2018 10:59 am
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