ApiUser with a password, and can do only what that user’s permissions allow.
Prerequisites
- An Icinga 2 API that CloudThinker can reach over HTTPS, by default on port
5665. For a private address, follow Reaching private services. - Access to the Icinga 2 configuration on the master, to add an
ApiUserand copy its CA certificate. - The Admin role in your CloudThinker workspace. See Roles.
Setup
Create an ApiUser
ApiUser object, for example in /etc/icinga2/conf.d/api-users.conf. Give it a strong password and only the permissions in Required permissions:Copy the CA certificate
/var/lib/icinga2/certs/ca.crt.Connect in CloudThinker
Connection details
Required permissions
Agent capabilities
Verify the connection
Example prompts
Troubleshooting
Icinga rejected the API user or its password.
Icinga rejected the API user or its password.
ApiUser name and password in the Icinga configuration, then edit the connection and paste them again.The API user signed in, but it lacks the status/query permission. Give it status/query and objects/query permissions.
The API user signed in, but it lacks the status/query permission. Give it status/query and objects/query permissions.
status/query and the objects/query permissions to the ApiUser, restart Icinga 2, and connect again. If a change fails later with a permission error, add the matching actions/ permission.That address has no Icinga 2 API. Use the API address, usually on port 5665.
That address has no Icinga 2 API. Use the API address, usually on port 5665.
https://icinga.example.com:5665, and no path.Icinga answered with a redirect. Use the exact https API address, such as https://icinga.example.com:5665.
Icinga answered with a redirect. Use the exact https API address, such as https://icinga.example.com:5665.
The Icinga certificate is not trusted. Paste the Icinga CA certificate, usually /var/lib/icinga2/certs/ca.crt on the master.
The Icinga certificate is not trusted. Paste the Icinga CA certificate, usually /var/lib/icinga2/certs/ca.crt on the master.
BEGIN and END lines. If the error stays, the host name in API URL does not match the API certificate.Could not reach the Icinga 2 API over HTTPS. Check the URL, port 5665, and that the sandbox can reach it.
Could not reach the Icinga 2 API over HTTPS. Check the URL, port 5665, and that the sandbox can reach it.
https://, includes the API port, and that your firewall lets CloudThinker reach it. Browser access from your laptop alone is not enough.An agent says the Icinga write tool is off
An agent says the Icinga write tool is off
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Use a dedicated
ApiUserfor CloudThinker with an explicit permission list. Never use*. - Port
5665also carries cluster traffic between Icinga nodes. Limit who can reach it with your firewall.