TurboTurtle / rig

A lightweight, flexible, easy to use system monitoring and event handling utility
GNU General Public License v2.0
10 stars 7 forks source link

#RFE - Can we execute certain set of commands when an event occurs rather than generating the sosreport #34

Open amey70404 opened 4 years ago

amey70404 commented 4 years ago

When analyzing an issue we sometimes require output of certain commands which are not included in sosreport, can we take this as a RFE? If there is some log (event) then the reaction should be the execution of a certain set of commands as suggested by the support engineer.

TurboTurtle commented 4 years ago

While I understand the desire for something like this, I'm extremely wary of providing for arbitrary command execution as an action. Two parts to this:

  1. First, there's the user experience part to consider - current actions are built in such a way that they can't deadlock the rig process (barring some other major issue with the system). This can't be said for executing user-providing scripts/ad-hoc commands. Second, there's the security concerns to consider - we don't allow shell scripting to be passed to E.G. the sosreport action for this reason, but it'd be downright required for an exec action or somsuch. Then there's the consideration that rig is not designed to make any changes to a system in response to an event - only collect diagnostic data. If we allow arbitrary command execution or script execution, we have no way of providing that guarantee.

  2. If there is diagnostic data that is missing from sosreport, it would be best to open an RFE to have sos collect that data.

All that said I'm not completely opposed to an such an action at some point - but we'd need to build it in such a way that we don't risk opening ourselves to greater problems than we're already trying to solve. If there's a proposal about how that can be done, I'm all ears.