Nagios Notification Overview - NETWAYS · PDF fileAbout me • CAPSiDE: Spanish based...

Post on 11-Mar-2018

220 views 4 download

Transcript of Nagios Notification Overview - NETWAYS · PDF fileAbout me • CAPSiDE: Spanish based...

Nagios Notification Overview

Jose Luis Martinez TorresCTO, CAPSiDEjlmartinez@capside.com

About me

• CAPSiDE: Spanish based consulting company• Monitoring Managed Services and Hosted

solutions• Using Opsview

– Frontend for Nagios– Altinity Partner– Contributed too ☺

• Small team, highly specialized

Notifications are pluggable

• As pluggable as service checks• Same interface• Lots of work already done

– Ready to go– No solution fits your needs– But you have a good starting point

Plugins

• Email• Telephone• SMS• RSS• Support Queue• IM• Twitter (Jaiku)• SMB• Sound• IRC• Others

• Nagios Exchange (nagiosexchange.org)• Google them too…

Not Plugins

• Windows tray– Nagios Tray Monitor– NTray– NTrayC– Nestor

• KTLight• NagiosChecker

@ the office On the go

@ the officegood old email

• Well known• Simple• Reliable• Robust• Almost no configuration• Integrations: Your mail

server should be pluggable too…

• Mail clients poll

@ the officegood old email

@ the officewho doesn’t have a phone?

@ the officewho doesn’t have a phone?

• Interrupt mode• Free if Nagios can

dial internalextensions

• Can speak out theproblem (festival)

@ the officeRSS

• Web 2.0• Feed Readers

– Mail clients now havefeed reading abilities

• Polling

@ the officeRSS

@ the officeSound

@ the officeSound

• Monitoring server isn’tusually attached tospeakers– Network sound

• H323 Call

@ the officeInstant Messaging / IRC

@ the officeInstant Messaging / IRC

• Interrupt mode• Lots of systems

– Jabber (GTalk)– AIM – ICQ– …

• Lots of clients– Roll out your own

@ the officeSupport Queue

@ the officeSupport Queue

• Integrate events intoyour workflow– RT– OTRS

• Integrate your supportsystem with Nagios– Acknowledge an alert

when a ticket is taken– Close a ticket if the

alert clears out• Good for big teams

@ the officeSMB

@ the officeSMB

• smbclient -m• Interrupt mode• Ugly little windows

alert

@ the officeTecno-Gadgets

@ the officeTecno-Gadgets

• Cleware stoplight

@ the officeTecno-Gadgets

• lcdproc

@ the officeTecno-Gadgets

• Nabaztag

On the goPhone

On the goPhone

• New phones have“new” capabilities

• Calling• Texting (SMS)• E-mailing• Gtalk (Jabber)

On the goCalling

On the goCalling

• Asterisk– Mobiles are not always

reachable• Try many times• Make sure that a

human answered (voicemails answer yourphone)

• Have a backup scheme– Don’t flood your poor

operator– Call the right person

On the goSMS

On the goSMS

• 3rd party service (webservice)

• Mobile attached toNagios box

On the goTwitter Jaiku

On the goTwitter Jaiku

• They can send SMS messages

I’ll do my own one

Programming notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Timeout

Get lockHas he been called

Less than 15 mins ago?

Write notification succededRelease lock

Pressed key

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Get lockHas he been called

Less than 15 mins ago?

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succeededRelease lock

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Get lockHas he been called

Less than 15 mins ago?

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succeededRelease lock

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Get lockHas he been called

Less than 15 mins ago?

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succededRelease lock

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Pressed keyTimeout

Timeout

Write notification succeededRelease lock

Programming Notifications

Call number Make himPress a key

Next number

Notificationsucceeded

Pick up

Timeout

Get lockHas he been called

Less than 15 mins ago?

Write notification succededRelease lock

Pressed key

Return to Nagios

Programming Notifications

• Separate content generation from the transport– Think UNIX style– generate_content | transport_the_message

• echo “$MACRO$ on $MACRO$” | sendmail

• You only have one chance, so do it right– Nagios will “timeout” your notification script (be

prepared)• If you should not be killed, detach the process

• Think in parallel (serialize with locks or look at Nan)

• You cannot return failure (or success)

Programming Notifications

• Language neutral• Info about the notification

– Command Line options (macros) vs EnvVariables

• http://nagios.sourceforge.net/docs/2_0/macros.html• http://nagios.sourceforge.net/docs/3_0/macrolist.html

• Return value– Not used (but try to return a 0 if all goes well)

Questions