DNS Service Monitoring

Dear Team,
I would like to monitor the CPU load of DNS services on our DNS Server.
For example, if the dns service consumes more than 10% of CPU of the whole server over a time period of more than a minute, I want checkmk to monitor this and raise an alert.
Is there a function for this in Checkmk?
Thanks in anticipation of your response

If you use named in a *NIX system you could monitor the daemon.
In Windows as far as I know you are lost, because no dedicated process running. I think these services are provided by this svchost thingy. So no chance to distinguish AFAIK.

Maybe a Windows exppert has better knowledge in this.

regards

Michael

Hi @fikayo,

you can use the rule process discovery (may be an other name on a newer version) to accomplish your needs:


Additional to this rule you need an active check to monitor your process in the first place and can configure your thresholds with this rule.
If you like to have a different time to alert this service you can use the rule Maximum number of check attempts for service to delay the hard state or modify your notification rule to delay the notification.

EDIT: Keep in mind, the default check time and therefore the default performance values are 1 minute. if you like to lower it you need a different configuration for this host, which can lead into additional load on the client.

2 Likes

I am sorry, I was wrong, there is a dedicated process dns.exe in windows which you could monitor.
Either use rule “Process Discovery” for dynamically discover the process as shown by tosch or “state and count of process” from manual checks.

regards

Michael

2 Likes

Thank you both for the response. Much appreciated.
I have done the setup as shown in the two figures. However i still get nothing.
I can see from the Task Manager itself that the CPU load of DNS service goes from 4 to 10%
But I do not get any alerts in check mk after setting up the rules.

Okay, two problems.

Your first picture is just the rule to enable or disable active checks for your host in general. The second rule is the one you are looking for if you like to discover this process and don’t have the need to ensure that this process is monitored.

Second problem is a bit of a misleading naming of the section in the rule of your second picture. The field Process Name is how your service will be shown in checkmk. The field below (Process Matching) is used to get the process from the windows process list to discover.

1 Like

I wrote the following local Windows plugin to expose svchost entries like processes. Might help.

WinServicePS.ps1 (1.4 KB)

3 Likes

Thanks all for the responses. I am now using the rule “state and count of process”.
When I use the option “Match all processes” under Process Matching, it discovers all processes.

However when I try to streamline the discovery to just the dns service, it does not discover anything.
I have used several entries ranging from “dns.exe” to “.*/dns” in the other two options under process matching that is “Exact name of the process without arguments” and “Regular expressions matching command line”

Any idea what should be the right entry for this process dns to be discovered?

Thanks.

The below config shown in the picture now works for me.
It now discovers one process which I believe is the dns service.
Thanks all

Thank you, I will soon test it.
Wondering why this is not in the official Windows Agent.

regards

Michael

There are sadly often good reasons, why custom plugins are not mainlined in checkmk. But if @cjcox wants that too, he can create a product idea, and it can be discussed there.

I fully support him and if wanted I can raise an official feature request.

regards

Michael

1 Like

You can see my post there at Exposing Windows svchost.exe (Services) as processes

Note, I also included the mod I made to checks/ps, so you’ll want that as well.

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.