Hello,
the next Monit version supports "$HOST" macro for the "check system", which
expands to the hostname. Changelog excerpt:
--8<--
* The "check system" can use the $HOST as service name, which will expand to the
system hostname. Example:
check system $HOST
--8<--
Regards,
Martin
On May 29, 2013, at 10:26 PM, "Holder, Shane" <[email protected]> wrote:
> Good day,
>
> I am wondering if it is possible to create resource checks without specifying
> a check system rule. The reason is I have several thousand systems which
> will be running monit and I would like to have one monitrc file for them all,
> the issue I am running into is the check system rule seems to require a
> string and that string is used when the system first pings mmonit. I don’t
> want to go back into mmonit and try and add the hostname. Effectively what
> I’m trying to achieve is a file which looks like.
>
> check system `hostname`
> if loadavg (1min) > 4 then alert
> if loadavg (5min) > 2 then alert
> if memory usage > 75% then alert
> if cpu usage (user) > 70% then alert
> if cpu usage (system) > 30% then alert
> if cpu usage (wait) > 20% then alert
>
> where hostname is retrieved, not specified.
>
> Thanks,
>
> Shane Holder | [email protected]
> Solutions Architect | AmerisourceBergen Specialty Group
> 3101 Gaylord Parkway, 2W-E131 | Frisco, TX 75034
> (469)365-7727
>
> CONFIDENTIALITY NOTICE. This electronic mail transmission may contain
> privileged, confidential and/or protected health information and is intended
> only for the review of the party to whom it is addressed. Any unauthorized
> use or disclosure of the information contained herein may be a violation of
> federal law, including the Health Insurance Portability and Accountability
> Act (HIPAA). If you have received this transmission in error, please
> immediately return it to the sender, delete it and destroy it without
> reading it. Unintended transmission shall not constitute the waiver of the
> attorney-client or any other privilege.
>
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general