BigFix patches and reboots our servers and with that we've also built in a task to put the host into a maint window for a max time period of 2 hours. The maint window we are wanting to leverage requires us passing in the host ID (see below screenshot). To get this we thought it would be as easy as issuing the oneagentctl --get-host-id command and in probably most cases that works fine. However, it seems that if we pull up a host in the UI and notice it leading with a 0 such as 047B731776145068 then the oneagentctl --get-host-id result will drop that leading 0, resulting in 47B731776145068. This causes issues because the api call expects the full id (0 included). We then get an error such as the below when attempting to post a new maint window.
Any reason why there is a discrepancy here? I am aware of possibly a workaround by reading a config file but prefer not to do that. It involves unnecessary work and requires the log file path and text to read within the file. If that ever changes with new releases of the oneagent then that breaks everything with our maint windows. I've seen this with OA version 1.259.304
Given property 'entityId' with value: 'HOST-47B731776145068' violates the following constraint: Please use a format of TYPE-ID.
Solved! Go to Solution.
what is the ID showing in the URL once you've navigated to the host? is it the same starting with 0?
to be honest, I don't know if the issue is with the version or not, but you can test that by downloading and installing the previous version if possible, of course, you can open a support ticket if the issue is in the version you can mention and if not then I think this is something that might require a fix.
I ended up creating a support ticket. This has been noted as a bug and should be fixed in agent version 1.266, per support.