[rudder-users] email notification

Jonathan Clarke jonathan.clarke at normation.com
Wed May 30 13:10:26 CEST 2012


Hi Michael,

On 30/05/12 11:35, Linder, Michael wrote:
> Hi,
>
> Firstly thanks all for this product which is very efficient.

Thanks for the warm feedback! It's most appreciated :)

> I have one question, is it possible to receive email notification when:
> 	- policy is not applied on host
> 	- policy has been applied on host
> 	- policy has been repaired on host
>
> May be it is feasible easily but I am new on CFengine so I ask to experts.

There is currently no built in feature in Rudder to send out email
notifications.

However, this can be acheived by an external tool. Some users use a
monitoring tool such as Nagios to parse Rudder's logs, and send
notifications that way.

For example, you could check the file /var/log/rudder/reports/all.log
for any lines containing "@@result_repaired@@". On my test server, this
gives something like this:

# grep "@@result_repaired"@@ all.log
2012-05-30T13:05:42+02:00 ubuntu-1110-64 rudder[27763]:  R:
@@Common@@result_repaired@@hasPolicyServer-root@@common-root@@25@@CRON
Daemon@@None@@2012-05-30
13:05:35+02:00##430e45a7-da08-409f-96d1-fdd86b270495@#The CRON daemon
has been successfully restarted
2012-05-30T13:06:02+02:00 ubuntu-12-04-64 rudder[1406]:  R:
@@Common@@result_repaired@@hasPolicyServer-root@@common-root@@25@@CRON
Daemon@@None@@2012-05-30
13:05:58+02:00##ac1e4fe4-d384-43ff-aaaa-72621f17f554@#The CRON daemon
has been successfully restarted

As you can see, you can get the node's name (it's ubuntu-12-04-64 in
this case), date, Rule and Directive (ex Policy Instance) name, etc. The
format of these lines is fully defined here:
http://www.rudder-project.org/foswiki/Development/ReportsInTechniques.

Hope this helps!
Jonathan
-- 
------------------------------------------------------------------------
*Jonathan CLARKE*
/CTO - Directeur technique/
Normation <http://www.normation.com>
------------------------------------------------------------------------
*87 rue de Turbigo, 75003 Paris, France*
Telephone: 	+33 (0)1 83 62 41 24
Mobile: 	+33 (0)6 99 60 03 10
------------------------------------------------------------------------



More information about the rudder-users mailing list