Accredited Registrar Accredited Registrar

Frequently Asked Question

FAQ / VPS


how to add host in nagios for monitoring?

Create a new configuration remotehost.cfg file under /usr/local/nagios/etc/objects in nagios server and define the host and the service definition for this particular remotehost in that file. Else take the localhost.cfg and copy it as remotehost.cfg and modifying it according to your needs.

host definition sample:

define host{
use linux-server
host_name host.remotehost.com
alias host.remotehost
address 101.102.103.104
}

Service definition sample:

define service{
use generic-service
host_name host.remotehost.com
service_description Host Status
check_command check_nrpe!check_hosts
}

Note: In all the above examples, replace remotehost with the corresponding to hostname of your remotehost.

Add configuration file path in nagios.cfg file,

/usr/local/nagios/etc/object/remotehost.cfg

To check configuration,run below command :

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

then restart nagios,

service nagios restart

Thats it, the host has been added to nagios for monitoring.





How this faq is helpful:

Not at all
helpful
Not much
helpful
Some what
helpful
Very
helpful
Extremely
helpful

What could be better? (Optional)
X
  Not related to my issue
  Too complicated explanations
  Too much information
  Incorrect information
  Unclear information
  Incomplete information
  Too old information
Do you have any other feedback about this faq ?
1000

Related Tags :