Feature: Esxi info feeding into M/Monit
Hello this question is more of a question.
Is there any way to feed M/Monit without a Monit Agent. Obviously Monit can not run on a ESXi host. I use M/Monit to monitor almost every single host type including Windows with the hacky method. I would love to be able to include Esxi hosts as well and I feel like the only way is to inject the data into M/Monit the way Monit does. Can you please advise how I can send data to M/Monit without a Monit agent so ESXi hosts can be “monitored”.
Right now I do a pull method were a script runs on a host which has Monit agent that ssh’s to ESXI hosts to collect information, but obviously I miss out on the Analytics function because programs are not captured historically.
I imagine I can make a payload from Esxi that can populate MMonit every x seconds, but i would need some guidance.
Thank you.
Comments (3)
-
-
reporter Awesome thanks for the information, this was put back on my plate to get started. If I can not get a esxi → mmonit proof of concept I am going to have to ditch monit :'(
-
Hello,
@Kiril Ballow, how do you do this sentence “including Windows with the hacky method”? Im interested on it.
I ported some monits to CYGWIN some years ago and it worked fine, even to send metrics to M/Monit.
Just published now: https://github.com/kfeina/CygMonit
Never understood why monit is not available in Windows or ported to something similar to my CygMonit package.
Thank you.
- Log in to comment
I had an idea that was the opposite of yours, but my approach might help you getting started. I was working on a M/Monit compatible backend based on PHP, a TSDB, and Grafana to monitor multiple servers. So what I did was to set up a super-nano php script as the mmonit target for a starting point. The needed part comes down to:
then I set this backend as the mmonit target with (in
monitrc
):After some cycles I had some xml files in the directory. It's a basic XML structure that could easily be recreated with any kind of script / language. Since I never had a mmonit instance to play with, I do not know the actual information that is needed for mmonit to accept a custom request. I observed that there is an initial request by monit that might do some kind of registration work on the mmonit-site. The only difference between this and the following requests is, that there is an additional XML-block
<event>
that contains the startup-event. Perhaps this is needed in order to make mmonit accept other requests. This is only a guess, but it would make sense in order to enable mmonit to check for a timed out monit-instance.So for your scenario you "only" have to provide the XML part that you want mmonit to parse and send it to your mmonit with anything http-compatible. curl for example: