Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management

Reply
Highlighted
Accepted Solution

tell a script what compliance rule triggered it

Techie
Posts: 15
3964     0

I'd like to set up triggered jobs for a number of policy rules but the script these triggers will run is pretty generic. I'd like to avoid having to maintain a seperate script for every triggered job. Is there a way to tell the script which rule triggered the job? I expect I'll be triggering a Perl script.

Highlighted

Re: tell a script what compliance rule triggered it

Expert
Posts: 236
3965     0

Probably John Belamaric will answer if that job detail is available via the API.

But for similar scripts triggered via policy violations, I've always had the script check the same rules via CLI.  That prevents a script from modifying a config that is already compliant.  And it can be safely run manually without relying on correct rules and policies.

Highlighted

Re: tell a script what compliance rule triggered it

Adviser
Posts: 353
3965     0
It doesn’t look like there is an automated way to do this. However, if you create an input to the script for this, then you can just set it in the Triggered Job definition, since you have to create one of those for each policy rule you want to associate the script with.

John
Highlighted

Re: tell a script what compliance rule triggered it

Techie
Posts: 15
3965     0

Good point. That will get me what I'm looking for. Thanks for the input.

Showing results for 
Search instead for 
Do you mean 

Recommended for You