Hi everyone. I have a question: To define a service I have to define a command, that would be executed by that service, before?
Thx
[SOLVED] Define Service and Define Comman Question
[SOLVED] Define Service and Define Comman Question
Last edited by nssantos on Tue Jan 19, 2016 11:49 am, edited 1 time in total.
Re: Define Service and Define Comman Question
There should be some commands already defined located in your commands.cfg, check_http for example will look like this -
Then, your host and service definition would be defined like so -
Code: Select all
define command {
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
Code: Select all
define host {
host_name google
alias Google Host
address google.com
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name google
service_description HTTP
check_command check_http
}
Former Nagios Employee
Re: Define Service and Define Comman Question
Great example rkennedy, Thanks!!!
I have another question... I have to do anything on targets monitored machines? Or only in my server?
I have another question... I have to do anything on targets monitored machines? Or only in my server?
Re: Define Service and Define Comman Question
That depends on the type of check being performed. Things like HTTP and ping are able to be checked without modifying the client at all, but if you want to check CPU, memory, disk space, or other information that is not available externally, you will need to install an agent that will listen on a port and perform checks on behalf of Nagios.
Former Nagios employee
Re: Define Service and Define Comman Question
I undestand, really make sense, I ask that because the tutorial that a read before didnt explain me right. In the way, that agent that you said is the NRPE?tmcdonald wrote:That depends on the type of check being performed. Things like HTTP and ping are able to be checked without modifying the client at all, but if you want to check CPU, memory, disk space, or other information that is not available externally, you will need to install an agent that will listen on a port and perform checks on behalf of Nagios.
Re: [SOLVED] Define Service and Define Comman Question
NRPE is one of the agents, yes. Here's a link with more information about it - https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Did you have any other questions?
Did you have any other questions?
Former Nagios Employee