How to update a process name from a process discovery rule?

We have a process discovery rule to find a certain agent software on our hosts and generate a label for it. Now this software changed the binary name with an update and all service checks on the hosts went red.

I assumed I had to adjust the binary name in the rule and everything should be green again. But this is not the case. After reading Process discovery / process name I assume that Checkmk will continue to use the parametes from the rule when the service discovery took place and won’t update it later on.

As I don’t want to change the process name, e.g. “XYZ Agent” - what is the correct way to update all hosts to use the new binary name?

So far I found only one workaround:

  1. Disable the discovery rule
  2. Run service discovery on all affected hosts and remove the vanished process service
  3. Enable the discovery rule with the updated binary name
  4. Run service discovery again

This is only feasible for only a small number of hosts. What would be the right way to do this in Checkmk?

Hi Stefan,

you should be able to use a rule under “Enforced services” in order to do what you want.

You can read up on that here: Understanding and configuring services - Detecting and monitoring elements of a host

Hi Simon,

I fail to see how to combine the process discovery mechanism with enforced services. Especially since we use process discovery to automatically create labels to role out agent plugins. If we need a label to use it with enforced services that would create a chicken and egg situation…

Hi Stefan,

When this happens, I believe you should be able to simply execute “Remove all and find new” from the action menu, on the host(s) in question, and you should be good to go.

HTH,
Thomas

Hi Stefan,

since checkmk stores the process match pattern after discovering a relevant process in the the check, all related Services must be refreshed after the pattern has changed so that the pattern in the ps check gets updated.

Option 1
After changing the pattern in the discovery rule refresh all PS Checks with following comand:

cmk -vII --plugins ps

Option 2
Add a specific “Periodic service discovery” Rule and use the Serive Filter to remove/add only the specific process check. After all Services have been refreshed you can remove the Periodic service discovery Rule again.

Option 3
Copy the discovery rule, change the pattern and place the rule above the old rule. Now you can run service discovery on all affected hosts. Theoretically, this should find the new binary and replace the previous service because the new rule is matched first.

Option 4
Vote for one of the Ideeas and hope that at some point checkmk will take care of this problem, which has been known for ages.

Regards, Lars

Early this morning I tried Thomas solution. Surprisingly this was not very reliable. On most hosts I had to click “Remove all and find new” twice. But at the end it worked.
What also works is moving the service to the undecided state and accept it immediately again.

For the different propsals Lars had:
Option 1: worked
Option 2: did not try this yet.
Option 3: this did not work, tried some variants of it without success
Option 4: voted for one of the tickets

Thank you for mentioning this option. Unfortunately, this option has to be done manually for each affected service.

Of course, it would be most customer-friendly if checkmk would automatically update all affected ps checks when the search pattern has been changed.