Page 1 of 2

How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:18 pm
by rlinux57
I've added service and command in nagios but still getting error while starting nagios service.

define service{
use generic-service
host_name XYZ
service_description DDOS
check_command check_ddos
}


define command{
command_name check_ddos
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_ddos -w $ARG1$ -c $ARG2$
}

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:27 pm
by tmcdonald
What error are you getting? It will be hard to diagnose without seeing that.

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:38 pm
by rlinux57
Here's the error "Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration."

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:42 pm
by abrist
Can you post the preceding lines to the above error? There should be a more verbose error earlier in the verification output.

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:45 pm
by rlinux57
i'm getting error while restart nagios service.

#service nagios restart
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:47 pm
by rlinux57
I have placed "check_ddos.pl" script on remote host.

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 12:59 pm
by scottwilkerson
lets verify the config, e.g.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 1:10 pm
by rlinux57
/usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg
-bash: /usr/local/nagios/bin/nagios: No such file or directory

There's no nagios in this path: /usr/local/nagios/bin/nagios

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 1:14 pm
by scottwilkerson
That was an example, you would have to change the path to the directory you nagios bin is located, same goes for the cfg file, you would have to use the path you have on YOUR server.

Re: How to add DDos Monitoring Service

Posted: Tue Jan 06, 2015 1:21 pm
by rlinux57
Here's the outcome.
Error: Could not find any host matching 'XYZ' (config file '/etc/nagios/servers/webs-services.cfg', starting on line 79)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/servers/webs-services.cfg', starting on line 79)


79 line starts from define service.
define service{
use generic-service
host_name XYZ
service_description DDOS
check_command check_ddos
}