we’re using Graylog actively since Version 4.1x and were really happy.
As the environment got bigger, we’ve come up with the idea to automate as much as possible. We built a whole batch script to install the graylog-sidecar on Windows Hosts via Group Policy Objects using a defined txt file, with the 51 char token in it, in a certain directory. Works fine so far.
The ultimate step would be: Generating the Sidecar Token via API. For Deployment Purposes it would make things more efficient.
Verify that 62556f575c21cf1c6ec9604c is the correct OID (object id) for your sidecar user, via the graylog UI: /system/users/edit/62556f575c21cf1c6ec9604c. If this is not the write OID use the one specific for your sidecar user.
thanks for your very fast reply.
As I’ve never worked with curl so far, I was trying to do so on a Windows Server via Powershell.
Just to understand the procedure a quick question:
Thanks for your snippet. Kudos to you drewmiranda-gl.
I tested it on my test-environment. Unfortunately it still isn’t working.
I got the following error message as reply:
Invoke-WebRequest :
{“type”:“ApiError”,“message”:“Not allowed to create tokens for user graylog-sidecar”}
It seems that I’ve not the permission needed to create.
But the good thing is, this led me to the solution. I need to create the $GRAYLOG_API_TOKEN for the Administrator, not the Sidecar-User. As the change was applied, it worked fine and i got the new token value for the sidecar user.