Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Installing Nagios... what do you want to know?


Recommended Posts

Posted

some of you may already know that Geoff is compiling a howto on installation and configuration of Cacti so that you can monitor various bits and bats on your networks. This will provide you with historical data.

 

To accompany the Cacti guide, I am writing a Nagios guide so hat you can see when things go tits up in realtime and hopefully help you track any problems down.

 

The guide should be pretty much distro independant and there will be some tips on keeping your config files nice and clean. i will be including checks for the following:

 

* Monitoring links between switches

* Checking if hosts are alive using ping

* Checking memory and CPU utilisation on HP Procurve kit

* Checking key services (web servers, proxies, DNS, etc.)

* Printer checks (starting with HP JetDirect-based printers)

 

i will also include links to relevant other documentation to aid in extending Nagios' functionality and there will be opportunity to extend the document further once it hits the wiki.

 

Is there anything else that anybody would like from the outset?

 

EDIT - Files attached here for convenience.

nagios-config-examples.tar_199.gz

nagios_howto_110_131.pdf

Posted
Indeed, this was the reason I set it up, as I have no way of interfacing nagios with anything else (can't use our LEA's exchange box for email and we don't want to pay for SMS messages).
Posted
Indeed, this was the reason I set it up, as I have no way of interfacing nagios with anything else (can't use our LEA's exchange box for email and we don't want to pay for SMS messages).

 

I use sendmail on the Linux box and forward my mail to my Exchange account. Some extra DNS entries allow me to reply too.

Posted
@webman: I would consider looking into it... however, somebody in all there wisdom has decided that Smartfilter should block Twitter in its entirity :roll:
Posted
I use sendmail on the Linux box and forward my mail to my Exchange account. Some extra DNS entries allow me to reply too.

 

Ah, but we can't use any mail servers here except the county exchange server and the web based easymail plus from the SWGfL - we can't even use the easymail IMAP/SMTP servers...

 

It is very annoying to say the least...

Posted
@localzuk: It's an internal mail system though using sendmail so you shouldn't have a problem. It then just uses SMTP to send to the Exchange server.
Posted

I think that there should be a decent section on notification, as this is the main way to know when, as Ric_ says, things go tits up.

 

I would recommend trying to stick to generic mode of communication i.e. email, netsend, IM, as these do not require any additional, if minimal, setup outside Nagios itself.

 

As most people are going to be new to this kind of thing as well as *nix itself I would suggest trying to keep it as simple as possible.

 

I have had an idea though, I wil look at trying to get messages directly from nagios to the Messenger Client I wrote as this would provide direct to desktop notifications in near realtime.

Posted

As for Twitter best way to do this is use php script that checks email account and sends off any emails to twitter.

 

@Ric

 

Hurry up with it as want to get it setup :)

 

Russ

Posted
I have had an idea though, I wil look at trying to get messages directly from nagios to the Messenger Client I wrote as this would provide direct to desktop notifications in near realtime.

 

I set this up to work with Jabber a while ago.

 

You need sendxmpp installed (in the universe repository for Ubuntu Dapper).

 

Command definitions:

 

# 'host-notify-by-epager' command definition
define command{
       command_name    host-notify-by-epager
       command_line    /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /usr/bin/sendxmpp -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
       }

# 'notify-by-epager' command definition
define command{
       command_name    notify-by-epager
       command_line    /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" | /usr/bin/sendxmpp -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
       }

 

you'll need to create a ~/.sendxmpp configuration file detailing the account information and server address sendxmpp is allowed to use. You'll also need to define contacts 'pager' addresses to be their jabber IM contact address.

Posted

Could you not install the mail bits required for smtp and pop3 accounts or whatever on a nix box or even windows and just keep it all internal?

 

Ben

Posted
Could you not install the mail bits required for smtp and pop3 accounts or whatever on a nix box or even windows and just keep it all internal?

 

Indeed, *nix hosts have 'ssmtp' installed which allows them to send mail to the primary MX. This then either routes mail out or back in to our Zimbra mail server.

 

Well that would mean having to maintain an email system that only worked internally

 

Basically you don't need a full blown mailer on a *nix machine unless it's actually doing something constructive or complex with mail. The ssmtp package is sufficient for sending mail.

Posted
So you set up just an internal jabber system instead, fair enough you have something that works.

 

Ben

 

Yep, in terms of time I would say it would take less to set up jabber than a mail system. And it is much easier to maintain (no message stores, no space restraints to worry about).

Posted
This howto is taking AGES to write. I'm onto page 36 and haven't written the config files for doing the basic checks yet!
Posted

Hey! I'm on to page 40 now!

 

The fact that NO host or service check examples have been given is beside the point!!!

Posted

Right... I shrunk the text because I figured that size 10 looked nicer than size 12 - suddenly 7 pages disappeared :D

 

Now back up to page 42... another hour and I should have the example configs done... then it ust needs a quick test ;)

Posted

Right... will be testing that the configs work but if anyone wants to give it a bash early ;)

 

Edit - Now with Switch Configs!

Another edit - Now with APC UPS checking ;)

Yet another edit - Now with Windows checking! :p

nagios_howto_110.pdf

Posted

Has anyone found any problems with this yet? There's the more advanced stuff to come still and I need to put some explanation of what different bits and pieces do - TBH staring at those 45 pages was doing my head in so I did the bare minimum before posting it up.

 

I'll plough on anyway.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...