About Nagios Wiki HowTos

A 5 star hangout for overworked and underpaid system admins.
chuina
Posts: 355
Joined: 2009/12/11 10:25:56

About Nagios Wiki HowTos

Post by chuina » 2010/05/14 00:50:05

Hi,
I'm trying to configure Nagios according to the [url=http://wiki.centos.org/HowTos/Nagios]HowTos->Nagios[/url]
But [i]stalled[/i] at the [b]Setting up nagios.cfg[/b] step. :-(
Because there is NO [b]localhost.cfg[/b] in /etc/nagios.
[code]# ls /etc/nagios/
cgi.cfg command-plugins.cfg htpasswd.users nagios.cfg objects resource.cfg [/code]
Here is rpm -qa
[code]# rpm -qa nagios\* | sort
nagios-3.2.1-3.el5.rf
nagios-devel-3.2.1-3.el5.rf
nagios-plugins-1.4.14-1.el5.rf
nagios-plugins-nrpe-2.12-1.el5.rf[/code]
Looks like the versions have been upgraded!

abednegoyulo
Posts: 550
Joined: 2007/12/26 06:24:38
Location: 127.0.0.2 44013

Re: About Nagios Wiki HowTos

Post by abednegoyulo » 2010/05/14 01:58:22

have you tried looking in the /etc/nagios/objects directory?

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: About Nagios Wiki HowTos

Post by chuina » 2010/05/14 02:38:05

Hi,Thanks,

I've just see the directory now.Meanwhile you already point out that.
[code]# ls /etc/nagios/objects/
commands.cfg localhost.cfg switch.cfg timeperiods.cfg
contacts.cfg printer.cfg templates.cfg windows.cfg[/code]
Should I mv that as *instructed* in the Wiki Page and proceed with the rest of the process ?

Actually I want to monitor a Local FTP service with Nagios.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

About Nagios Wiki HowTos

Post by scottro » 2010/05/14 03:41:17

The best bet is to go directly to Max Hetrick's guide. Hrrm, site seems to be down.

At the bottom of the page is a link to the original article--there were disagreements about the format of the wiki article, which unfortunately, led to its being less clear than it could have been, i.e., more like typical Linux documentation. :)


I suspect the maxsworld.org site will be back shortly, the link is at the end of the wiki article.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: About Nagios Wiki HowTos

Post by scottro » 2010/05/14 03:51:23

Hrrm, /etc/nagios/objects seems like something new. It used to all be in /etc/nagios.

Don't know when that change was made. Was that a nagios decision? Was there any point to it besides making it necessary to alter configuration files and keep people on their toes?

abednegoyulo
Posts: 550
Joined: 2007/12/26 06:24:38
Location: 127.0.0.2 44013

Re: About Nagios Wiki HowTos

Post by abednegoyulo » 2010/05/14 04:27:33

On my test machine(a.k.a. virtualmachine) that time had forgotten, it has

[code]
rpm -q nagios
nagios-3.0.6-1.el5.rf
[/code]

And the /etc/nagios/objects existed in that version. I do remember in my vague recollection that I did not moved any files or directories. All I did was install the package, configure the existing files, and test if it works as I expect it.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: About Nagios Wiki HowTos

Post by scottro » 2010/05/14 10:21:18

Ah, that explains it. Using nagios 2.x here.

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: About Nagios Wiki HowTos

Post by chuina » 2010/05/14 12:39:18

[quote]abednegoyulo wrote:
.... I do remember in my vague recollection that I did not moved any files or directories. All I did was install the package, configure the existing files, and test if it works as I expect it.[/quote]
I'm reading it as rest of the Wiki steps is fine to follow (?)

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: About Nagios Wiki HowTos

Post by chuina » 2010/05/15 00:49:33

Able to start Nagios with "setenforce 0"
Cause,
[code]# chcon -R httpd_sys_content_t /var/nagios/
chcon: invalid context: httpd_sys_content_t[/code]
?

=========
EDIT:
=========
This one changed/accepted the contexts
[code]chcon -R system_u:object_r:httpd_sys_content_t /var/nagios/[/code]

With "setenforce 1"
[code]# restorecon -R /var/nagios/
# service nagios restart
Stopping nagios: [FAILED]
Starting nagios: [FAILED][/code]

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: About Nagios Wiki HowTos

Post by scottro » 2010/05/15 16:47:51

I just heard from the article's original author (and creator of the page to which I linked, then said it seemed to be down.)

As he's quite busy these days, he doesn't know if the page will get back up, or be updated--as we've discovered here, the wiki article (and page to which I linked) are for nagios 2.

Phil, if you have a chance, maybe that last line in the wiki article, with a link to a no longer exisiting page, should be removed.

(And perhaps also a note about the article being for nagios 2.)

Post Reply