Page 3 of 3

Re: NRDP

Posted: Fri Jun 24, 2016 9:31 am
by rkennedy
Thanks @eloyd!

@peter19x - that should do the trick, let us know if you have further questions.

Re: NRDP

Posted: Mon Jun 27, 2016 5:47 am
by peter19x
Hello,

Thanks @eloyd

I have added the apache user in the nagcmd group although the command did not work and gave the below:

Code: Select all

[root@GSIP_MGNT_A checkresults]# usermod apache -a -G nagcmd,nagios
usermod: user 'nagcmd,nagios' does not exist
I have used the command below

Code: Select all

[root@GSIP_MGNT_A checkresults]# usermod -a -G nagcmd apache
[root@GSIP_MGNT_A checkresults]# groups apache
apache : apache nagcmd checkmk
and now the files created are in the format below and there is no more errors!

Code: Select all

-rwxrwx---. 1 apache nagcmd 228 Jun 27 09:53 coRycNj
Now I am getting the error in the nagios.log

/usr/local/nagios/var/nagios.log

Code: Select all

[1467022444] Error: Got check result for service 'dbstatus' on host 'sbc-siplab02'. Unable to find service
So I have added my host that is sending the passive checks along with the service dbstatus In a .cfg file as below:

Code: Select all

define host{
        host_name               sbc-siplab02
        address                 172.25.25.11
        check_command           check-host-alive
        check_period            24x7
        check_interval          5
        retry_interval          1
        max_check_attempts      5
        contact_groups          admins
        notification_interval   *
        notification_period     workhours
        }

define service{
        host_name                       sbc-siplab02
        service_description           dbstatus
        check_period                    24x7
        max_check_attempts         5
        normal_check_interval       5
        retry_check_interval          1
        }

Pardon my question if it is too basic, but I am not sure what 'check_command' should be added in the service dbstatus or if there is something else for passive checks that should be added

and when I run

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get the following error:
Error: Could not register service (config file '/usr/local/nagios/etc/objects/store.cfg', starting on line 33)

line 33 is the dbstatus service I have added.

My Passive check command that I send from the server is the below:

Code: Select all

/home/nagiosscripts/send_nrdp.sh -u http://172.25.28.119/nrdp/ -t nb65fgtadI39 -H "sbc-siplab02" -s "dbstatus" -S 2 -o "DB status is DOWN"
Any idea what is missing in this scenario ?

Thanks,
Peter

Re: NRDP

Posted: Mon Jun 27, 2016 7:19 am
by eloyd
I may have messed up my command, but I'm glad you got it working. I'm guessing the mods will want you to open a new topic on this latest development, though, to keep things separate.

Re: NRDP

Posted: Mon Jun 27, 2016 7:56 am
by peter19x
Sure,

Thank you for the help again!

I am fine with closing this thread now.

Best Regards,
Peter