Ric_ Posted May 10, 2007 Posted May 10, 2007 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.gznagios_howto_110_131.pdf
localzuk Posted May 11, 2007 Posted May 11, 2007 I dunno, but I'll write a quick segment on how to integrate notifications with Jabber if you like? I find it an invaluable part of the system.
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 @localzuk: Clever... Jabber is something that I'm yet to use so this could give me a reason to start
localzuk Posted May 11, 2007 Posted May 11, 2007 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).
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 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.
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 @webman: I would consider looking into it... however, somebody in all there wisdom has decided that Smartfilter should block Twitter in its entirity
localzuk Posted May 11, 2007 Posted May 11, 2007 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...
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 @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.
ICTNUT Posted May 11, 2007 Posted May 11, 2007 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.
russdev Posted May 11, 2007 Posted May 11, 2007 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
Geoff Posted May 11, 2007 Posted May 11, 2007 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.
localzuk Posted May 11, 2007 Posted May 11, 2007 I did it using the plugin http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[p_view]=181 Just edited the 'notify_via_jabber' perl file and voila. I'll rustle up a complete mini-howto on how I did it, so people could use either method. @Ric_ = nope, can't send email out from our own SMTP to it as it is blocked by their firewall...
plexer Posted May 11, 2007 Posted May 11, 2007 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
localzuk Posted May 11, 2007 Posted May 11, 2007 Well that would mean having to maintain an email system that only worked internally - which seems pointless to me.
plexer Posted May 11, 2007 Posted May 11, 2007 So you set up just an internal jabber system instead, fair enough you have something that works. Ben
Geoff Posted May 11, 2007 Posted May 11, 2007 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.
localzuk Posted May 11, 2007 Posted May 11, 2007 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).
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 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!
webman Posted May 11, 2007 Posted May 11, 2007 Slow-coach 8) What you doing - writing with a quill and scanning it in via OCR?
Ric_ Posted May 11, 2007 Author Posted May 11, 2007 Hey! I'm on to page 40 now! The fact that NO host or service check examples have been given is beside the point!!!
Ric_ Posted May 13, 2007 Author Posted May 13, 2007 Right... I shrunk the text because I figured that size 10 looked nicer than size 12 - suddenly 7 pages disappeared Now back up to page 42... another hour and I should have the example configs done... then it ust needs a quick test
Ric_ Posted May 13, 2007 Author Posted May 13, 2007 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! nagios_howto_110.pdf
Ric_ Posted May 14, 2007 Author Posted May 14, 2007 ^^^^ HOWTO has been updated now that I have checked the config files. I also attach the config files that I have used nagios-config-examples.tar.gz
Ric_ Posted May 14, 2007 Author Posted May 14, 2007 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now