Page 1 of 1
Create nagios scripts and not showing on web interfaces
Posted: Tue Mar 24, 2015 4:41 am
by pianunix
Hi,
Today i have created my own bash scripts and adding this into nagios monitoring, but some how this result wont show up in nagios web interfaces, but when i execute the scripts was running with successfull.
Code: Select all
:~# /usr/lib/nagios/plugins/check_nrpe -H server45026x -c usedspace_bash
OK - 33% of disk space used.
Can anyone know how to solve this problem ?
Thanks
Re: Create nagios scripts and not showing on web interfaces
Posted: Tue Mar 24, 2015 9:22 am
by tmcdonald
pianunix wrote:but some how this result wont show up in nagios web interfaces, but when i execute the scripts was running with successfull.
What do you mean by this? Did you create a service definition for it? If not, it will neither be visible nor running. If you do have configs please post them.
Re: Create nagios scripts and not showing on web interfaces
Posted: Tue Mar 24, 2015 10:09 pm
by pianunix
Service description already added, but still wont show on the web interfaces
file.cfg
Code: Select all
define service {
use generic-service
host_name xxxxxxxxxxxxxxxxx
service_description Custom Disk
check_command check_nrpe_1arg!usedspace_bash
}
and sorry the hostname i change it.
command.cfg
Code: Select all
define command{
command_name usedspace_bash
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c usedspace_bash
}
Re: Create nagios scripts and not showing on web interfaces
Posted: Wed Mar 25, 2015 11:13 am
by ssax
Looks like you need to modify your service check_command:
Code: Select all
define service {
use generic-service
host_name xxxxxxxxxxxxxxxxx
service_description Custom Disk
check_command usedspace_bash
}
Re: Create nagios scripts and not showing on web interfaces
Posted: Wed Mar 25, 2015 10:23 pm
by pianunix
This problem has been fixed, and the solution fixed the command.cfg because they has the same command at usedspace_bash.
Re: Create nagios scripts and not showing on web interfaces
Posted: Thu Mar 26, 2015 9:33 am
by ssax
I'm glad that helped you out, I'll be marking the ticket as resolved and locking the ticket now.