Jorge Fernandez


¿Quieres ver mi portfolio de fotografias? | [ Nomadas ]

28/10/2008

Do you want to receive your nagios monitoring system alarms on your twitter account?
Nagios + Twitter in 20 simple steps ;-)
1-. Create a twitter bot user2-. logon with your new twitter bot3-. go to settings4-. mark your updates as private5-. logout6-. logon with your regular twitter user7-. follow your twitter bot8-. logout9-. logon again with your twitter bot10-. accept the follow request11-. logout12-. logon again (Argh!) with your regular twitter user13-. ssh/telnet to your nagios installation14-. go to your nagios objects directory (/usr/local/nagios/etc/objects)15-. paste this (change user and password) into commands.cfgdefine command { command_name    alarma-twitter command_line    /usr/bin/curl —connect-timeout 30 —max-time 60 -u YOUR_TWITTER_BOT_USER:YOUR_TWITTER_BOT_PASSWORD -d status=”$SERVICEDESC$@$HOSTNAME$ is $SERVICESTATE$ ** $SERVICEOUTPUT$ **  Date: $SHORTDATETIME$” http://twitter.com/statuses/update.xml}16-. paste this into templates.cfgdefine contact { name                                twitter_contact service_notification_period         24x7 host_notification_period            24x7 service_notification_options        w,u,c,r,f,s host_notification_options           d,u,r,f,s service_notification_commands       alarma-twitter host_notification_commands          alarma-twitter register                            0 }17-. paste this into contacts.cfgdefine contact{ contact_name        twitter_jorge use                 twitter_contact alias               Twitter Jorge }18-. edit some service you have defined and select “twitter_jorge” as contact
define service{use passive_servicehostgroup_name servidores_solariscontacts twitter_jorgeservice_description Prueba NSCA}
19-. submit a passive check for this service20-. go to your twitter homepage, et voilá ;-)
Sorry for my bad english!

Do you want to receive your nagios monitoring system alarms on your twitter account?

Nagios + Twitter in 20 simple steps ;-)

1-. Create a twitter bot user
2-. logon with your new twitter bot
3-. go to settings
4-. mark your updates as private
5-. logout
6-. logon with your regular twitter user
7-. follow your twitter bot
8-. logout
9-. logon again with your twitter bot
10-. accept the follow request
11-. logout
12-. logon again (Argh!) with your regular twitter user
13-. ssh/telnet to your nagios installation
14-. go to your nagios objects directory (/usr/local/nagios/etc/objects)
15-. paste this (change user and password) into commands.cfg

define command {
command_name    alarma-twitter
command_line    /usr/bin/curl —connect-timeout 30 —max-time 60 -u YOUR_TWITTER_BOT_USER:YOUR_TWITTER_BOT_PASSWORD -d status=”$SERVICEDESC$@$HOSTNAME$ is $SERVICESTATE$ ** $SERVICEOUTPUT$ ** Date: $SHORTDATETIME$” http://twitter.com/statuses/update.xml
}

16-. paste this into templates.cfg

define contact {
name                                twitter_contact
service_notification_period         24x7
host_notification_period            24x7
service_notification_options        w,u,c,r,f,s
host_notification_options           d,u,r,f,s
service_notification_commands       alarma-twitter
host_notification_commands          alarma-twitter
register                            0
}

17-. paste this into contacts.cfg

define contact{
contact_name        twitter_jorge
use                 twitter_contact
alias               Twitter Jorge
}

18-. edit some service you have defined and select “twitter_jorge” as contact

define service{
use passive_service
hostgroup_name servidores_solaris
contacts twitter_jorge
service_description Prueba NSCA
}

19-. submit a passive check for this service
20-. go to your twitter homepage, et voilá ;-)

Sorry for my bad english!

Comentarios
blog comments powered by Disqus
Tumblr » powered Sid05 » templated