How to add DDos Monitoring Service

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.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

How to add DDos Monitoring Service

Post 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$
}
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to add DDos Monitoring Service

Post by tmcdonald »

What error are you getting? It will be hard to diagnose without seeing that.
Former Nagios employee
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to add DDos Monitoring Service

Post by rlinux57 »

Here's the error "Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration."
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to add DDos Monitoring Service

Post by abrist »

Can you post the preceding lines to the above error? There should be a more verbose error earlier in the verification output.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to add DDos Monitoring Service

Post by rlinux57 »

i'm getting error while restart nagios service.

#service nagios restart
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
Last edited by rlinux57 on Tue Jan 06, 2015 12:56 pm, edited 1 time in total.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to add DDos Monitoring Service

Post by rlinux57 »

I have placed "check_ddos.pl" script on remote host.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to add DDos Monitoring Service

Post by scottwilkerson »

lets verify the config, e.g.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to add DDos Monitoring Service

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to add DDos Monitoring Service

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to add DDos Monitoring Service

Post 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
}
Last edited by rlinux57 on Tue Jan 06, 2015 1:28 pm, edited 1 time in total.
Locked