I use monit (https://mmonit.com/monit/) for system monitoring. Also I use my own "backend" instead of m/monit and I want to receive additional data from the monit instances.

For example, is it possible to read the data from the file and then send this data together with regular report?


I don't know how to read from file, but you can send script's result.

Add to monitrc

check program my-custom-data with path "/path/to/test_mydata.sh"
    if status > 60 then alert . # just example
    group custom-data

Bash file example:

exit 56

and as result you will have this data in your xml

<service name="my-custom-data">
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.