OS version: windows machines
Error message: The installed agent needs to be updated
Three weeks ago, I did post here where I was having trouble with an error called “not valid key signature”. @andreas was the one that the workaround worked (bake > sign > sign again).
I was adding some new services to some servers, so I had to bake the agents in order to get them updated and test if the service is configured correctly.
I did the bake > sign > sign again and this is what I see:
Again the same problem like before, some servers with that annoying warning, others don’t even update…
Last time (yeah because this is not the first time) to fix the issue of the hosts that wont get the update we use a SCCM to send a
checkmk_agent.exe updater -rf command, which it worked well for most of them. The last ones we had to do a smaller list, because it seems like checkmk cant handle mass requests.
So I tried to run manually that command (
checkmk_agent.exe updater -rf) and this is what I get now:
Now the manual update is not even working.
What is happening? The workaround with the SCCM was very inefficiency and doesn’t make any sense having to do it every time we need to trouble shoot or bake an agent.
seems that you haven’t configured and baked an agent for this host:
I think thats the problem.
I do have baked an agent, multiple times actually, but it wont go through.
let’s open Setup > Windows, Linux, Solaris, AIX and filter for your host. What do you see/get? Can you post a screenshot?
I get this rule
This is agent rule that the host is placed in. It should be using the agent version number: …b5b7 but the print before shows otherwise.
I have 100% I have the hosts there if that’s the doubt you’re having. They were working before, why is that when I have to update them they don’t communicate?
what’s the hostname in
I see now, the hostname is in uppercase in the file but in checkmk it is in lowercase, is it normal?
Tried to change in lower case but it doesnt work, because the machine name is in upper case or else I have the invalid hostname secret.
EDIT: Actually, the machine is in lower case but for some reason it only works if the host Secret is in upper case. Could it be that the AD has the name in upper case? I dont have access to that part
you have registered the host with a wrong hostname. You can delete the file
cmk-update-agent.state. After this, let’s try to register with the correct hostname:
checkmk_agent.exe updater register
It seems like that worked, at least for this host.
I will try to check on more if the hostname on the file
cmk-update-agent.state are messed up like this.
Is there any reason why it worked the first time then?
I have this powershell command running it should work like this. Why is everything going UPPER CASE.
$hostname = $env:COMPUTERNAME.ToLower()
cd “C:\Program Files (x86)\checkmk\service”
.\check_mk_agent.exe updater register -H $hostname -U cmkupdate -S secreat passowrd
I can’t find errors in your commands - they work perfect for me. You could try to run the registration command like this:
.\check_mk_agent.exe updater register -H $($env:COMPUTERNAME.ToLower()) -U cmkupdate -S secret
It didn’t worked.
They always get registered in Upper case.
Even the computers that have their name in lower case are being changed to Upper Case.
Is this something maybe related to DNS ? I head checkmk is case sensitve to DNS?
the registration has - AFAK - nothing to do with DNS. Is it working if you register manually?
It is, but this is 1 of the 470 host with this problem. I cant do it manually for each one.
so it is not a Checkmk problem - it is a Windows problem …
What’s the result, when using these commands:
$hostname = ($env:COMPUTERNAME).ToLower()
I get a lower case host. Thats why I think something is wrong with CheckMK.
The script seems to work. I even put in the end of my script
echo $hostname and it shows as lower case but checkmk takes it at higher case
strange … the hostname is passed to the registration script?!?
Let’s do another test:
.\check_mk_agent.exe updater register -H $($env:COMPUTERNAME.ToLower()) -U AWrongUserName -S AWrongSecret
What’s the hostname in the error message?
If I do the user and password wrong. it says:
Cannot authenticate, invalid user/passwort/secret.
Well then please use the right credentials.