[rudder-users] email notification

Linder, Michael Michael.Linder at arcelormittal.com
Thu May 31 07:42:37 CEST 2012


Hi Jonathan,

Thanks for your answer and I have the same idea to achieve it by another tool or script. I have got another question because, I tried to force content of file, it seems working ( I see changes into the file ) but in the reports interface the status appears as unknown and the compliance percent is 0%. Do you have any idea?

Best regards,
Michael.

-----Original Message-----
From: Jonathan Clarke [mailto:jonathan.clarke at normation.com] 
Sent: Wednesday, May 30, 2012 1:10 PM
To: Linder, Michael
Cc: rudder-users at lists.rudder-project.org
Subject: Re: [rudder-users] email notification

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