Re: [ClusterLabs] dry-run an alert?

2017-08-14 Thread Klaus Wenninger
On 08/07/2017 07:02 PM, Ken Gaillot wrote:
> On Mon, 2017-08-07 at 17:48 +0100, lejeczek wrote:
>> hi everyone
>>
>> I wonder, is it possible to dry-run an alert agent? Test it 
>> somehow without the actual event taking place?
>>
>>
>> many thanks.
>> L.
> There's no special tool to do so, but it would be fairly simple to do it
> by hand -- just set the environment variables to simulate the event you
> want and then call the agent. The possible environment variables are
> described at:
>
> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_writing_an_alert_agent
>

And don't forget to run it as user hacluster to see in how far a restricted
user influences the behavior.
Note: the possibility to configure the user an alert-agent is run as is in
the pipe - or already upstream on the master-branch ...

Regards,
Klaus


___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] dry-run an alert?

2017-08-07 Thread Ken Gaillot
On Mon, 2017-08-07 at 17:48 +0100, lejeczek wrote:
> hi everyone
> 
> I wonder, is it possible to dry-run an alert agent? Test it 
> somehow without the actual event taking place?
> 
> 
> many thanks.
> L.

There's no special tool to do so, but it would be fairly simple to do it
by hand -- just set the environment variables to simulate the event you
want and then call the agent. The possible environment variables are
described at:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_writing_an_alert_agent

-- 
Ken Gaillot 





___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org