Where define a host Linux?

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.
Locked
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Where define a host Linux?

Post by xerez »

Hi, I feel a little silly, but where I have define a Linux host?

I read in the documentation that for monitoring windows, could use "windows.cfg", but for Linux (http://nagios.sourceforge.net/docs/3_0/ ... linux.html) not says nothing. And this doc is very short...

Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Where define a host Linux?

Post by ssax »

You can put it in any file you want as long as it's included in the /usr/local/nagios/etc/nagios.cfg file.

You could create a new file and add this line in your nagios.cfg (put it next to the other ones in there)

Code: Select all

cfg_file=/usr/local/nagios/etc/objects/linux.cfg
Make sure to:

Code: Select all

chown nagios.nagios /usr/local/nagios/etc/objects/linux.cfg
chmod 774 /usr/local/nagios/etc/objects/linux.cfg
service nagios restart
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: Where define a host Linux?

Post by xerez »

Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Where define a host Linux?

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked