how to use snmp trap command to send to monitoring tool if the node goes to changed state

147 views
Skip to first unread message

Spriya

unread,
Nov 18, 2014, 9:50:45 AM11/18/14
to puppet...@googlegroups.com
Hi ,

How to use snmp trap command if the server goes to changed state in puppet?

Anyone,Please help me

Thank you


Juan Sierra Pons

unread,
Nov 18, 2014, 10:44:42 AM11/18/14
to puppet...@googlegroups.com
Hi,

Probably there is a more straightforward way of doing this. Just my 5 cents

Supposing you have the dashboard installed:

1.- Create a script that checks the msyql db for servers that changed
the state during last run. Check nodes table
2.- Make this script launch the traps you need.
3.- Put this script in a cron job

In less than 10-20 lines/30 minutes you should have a working
solution. Quick and dirty :)

Best regards
--------------------------------------------------------------------------------------
Juan Sierra Pons ju...@elsotanillo.net
Linux User Registered: #257202
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/eec10178-e00d-4492-a89d-c37434f48592%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Spriya

unread,
Nov 18, 2014, 10:47:34 AM11/18/14
to puppet...@googlegroups.com
Hi,

Appreciate your help. Do you have any sample script to just get started

Thank You

Juan Sierra Pons

unread,
Nov 18, 2014, 10:55:57 AM11/18/14
to puppet...@googlegroups.com
2014-11-18 16:47 GMT+01:00 Spriya <supriya.u...@gmail.com>:
> Hi,
>
> Appreciate your help. Do you have any sample script to just get started
>
> Thank You

Hi,

I wrote this post in Spanish long time ago about connecting to a msyql
DB from a bash script:
http://www.elsotanillo.net/2006/05/linux-acceso-a-una-bbdd-mysql-desde-bash-2/

At least the DB connection step is solved. :)

Hope it helps
Reply all
Reply to author
Forward
0 new messages