I’m pretty new to linux and icinga, but with the guides and the communicty help I already managed to setup icinga2, icingaweb2 and since yesterday also the director.
Now I want to create a host template in the director, but when I press “deploy” I get the following error message:
Unable to authenticate, please check your API credentials (RestApiClient.php:149)
Despite my searches on the web I didn’t find a solution yet. I thank you guys to guide me in the debugging of this little problem.
How can I check the API is enabled?
Icinga is restarted without problems . @stevie-sy
I did configure the API user like mentioned, well I at least tried.
But I didn’t add the user in the Director.
I added him now, but the error still occurs:
I more information is need, just let me know and I’ll provide the necessary!
Hero!
That was the solution, I added the wrong user there (in my first setup attempt I used root as api user, but was a bit confusing so I changed it to icingadirector).
Changing my user there to the correct one and now I can deploy my template.
Now I can continue with the setup.
Hello, I am having a similar problem (same error message as the OP’s).
When I try the cURL test I get
# curl -k -s -u director:director 'https://localhost:5665/v1'
<h1>Unauthorized. Please check your user credentials.</h1>
Do I have to have the “director” ApiUser created already? I thought the Director Kickstart would create it for me. If so, where do I put it? Do I put it in /etc/icinga2/conf.d/api-users.conf ?
I was afraid to add it manually because the (very confusing) documentation says to add it via the Icinga 2 Setup Wizard, which I ran ages ago (and don’t remember anything about Zones or ApiUsers for Director).