10 Apr 2023 06:59 PM - edited 11 Apr 2023 02:50 PM
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.
13 Apr 2023 02:06 PM
Hi @sivart_89,
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.
17 Apr 2023 08:42 PM
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.
20 Jun 2023 09:52 PM
FYI for anyone who may have been impacted by this, the fix seems to have been put into OneAgent version 1.267. Support told me 1.266 which I thought was strange being it's always been increments of 2 (odd #s) but I ran with it anyways. We of course did not receive version 1.266 but did get 1.267. I am seeing the fix in 1.267