You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request to add a monitorable which would execute commands, and update the tile based on the command's output and/or exit code.
Rationale: This would be the final word in extensibility. If the backend is capable of running commands, then it is possible and fairly easy to monitor almost anything without more specialized monitors needing to be written. Go already has decent tools for running commands with the standard library os\exec package.
I understand that a "proxy" monitorable is in the works; I wanted to float this idea as a either simpler version of, or complementary to that. This monitorable would be the steak knife to HTTP proxy's scalpel. Blunter, but easier to use for the end-user.
The use case I had in mind for this is monitoring a DNS server. While the PORT monitorable will tell me if the daemon is running, it's not a very good functional test. I would prefer to run dig or nslookup and examine the exit code of the command.
Suggested implementation details
Configuration
Similar semantics to the HTTP-* family of monitorables, for example:
Identical regex and formatting options for -raw and -formatted
Exit code max is implicitly 0
Would probably need a timeout env variable, defaulting to something like 10,000 ms
Backend
In the name of keeping things simple for the user, implicitly pass the command through to a shell (sh or bash); this saves the need from having to separate the command from its arguments at configuration, and also gains some niceties like easily settable environment variables and such.
Call .start, come back and call .wait to collect the results
Not sure what happens if a command goes out to lunch; is the backend then stuck waiting on a routine forever? Could result in scary resource consumption if the command, say, uses something on network storage that has disappeared. Would need to introduce a way to ensure that only one instance of the command is running at a time.
The text was updated successfully, but these errors were encountered:
This is a feature request to add a monitorable which would execute commands, and update the tile based on the command's output and/or exit code.
Rationale: This would be the final word in extensibility. If the backend is capable of running commands, then it is possible and fairly easy to monitor almost anything without more specialized monitors needing to be written. Go already has decent tools for running commands with the standard library
os\exec
package.I understand that a "proxy" monitorable is in the works; I wanted to float this idea as a either simpler version of, or complementary to that. This monitorable would be the steak knife to HTTP proxy's scalpel. Blunter, but easier to use for the end-user.
The use case I had in mind for this is monitoring a DNS server. While the PORT monitorable will tell me if the daemon is running, it's not a very good functional test. I would prefer to run dig or nslookup and examine the exit code of the command.
Suggested implementation details
Configuration
Backend
.start
, come back and call.wait
to collect the resultsThe text was updated successfully, but these errors were encountered: