Hi there, I am new to the Icinga monitoring and trying to set up to monitor AWS env from cloudwatch, I have zero knowledge of this. Can someone point me to the appropriate docs or guide, please?
I get the following error while performing any action from the icinga dashboard icinga2: Can’t connect to the Icinga 2 API: 0 cURL error 7: Failed to connect to localhost port 5665 after 0 ms: Connection refused (see libcurl - Error Codes)
in icingaweb2 the module responsible for monitoring is either “monitoring” or icingadb.
in one or both of these modules there is a configuration page for a transport layer.
there you have to fill out a icinga2 api user
I’m not sure I understand “icinga dashboard icinga2” but as @moreamazingnick mentioned, you need to setup the Icinga2 API and tell Icingaweb2 and possibly others the credentials for the error to go way.
Thanks for getting back. Unfortunately, we encountered another issue while setting up the Icinga web. while setting up with the DB resource we get this message: The database you've configured to use for Icinga Web 2 seems to be the one of Icinga. Please be aware that this database configuration is supposed to be used for Icinga Web 2's configuration and that it is highly recommended to not mix different schemas in the same database. If this is intentional, you can skip the validation and ignore this warning. If not, please provide a different database.
We have created an entirely new DB named icingaweb but still that message pops out. not sure if we have missed anything.
To add more we get the below message after finishing up the setup:
General configuration has been successfully written to: /etc/icingaweb2/config.ini
Authentication configuration has been successfully written to: /etc/icingaweb2/authentication.ini
Account "icinga2" has been successfully defined as initial administrator.
User Group Backend configuration has been successfully written to: /etc/icingaweb2/groups.ini
Unable to create user group "Administrators". An error occured:
ERROR: Zend_Db_Statement_Exception in /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php:225 with message: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "icingaweb_group" does not exist
LINE 1: SELECT COUNT(*) AS cnt FROM icingaweb_group AS g WHERE (g.na...
^, query was: SELECT COUNT(*) AS cnt FROM icingaweb_group AS g WHERE (g.name = 'Administrators')
Resource configuration has been successfully written to: /etc/icingaweb2/resources.ini
Monitoring backend configuration has been successfully written to: /etc/icingaweb2/modules/monitoring/backends.ini
Resource configuration has been successfully updated: /etc/icingaweb2/resources.ini
Command transport configuration has been successfully created: /etc/icingaweb2/modules/monitoring/commandtransports.ini
Monitoring security configuration has been successfully created: /etc/icingaweb2/modules/monitoring/config.ini
Module "monitoring" could not be enabled. An error occured:
ERROR: Icinga\Exception\SystemPermissionException in /usr/share/php/Icinga/Application/Modules/Manager.php:295 with message: Cannot enable module "monitoring". Check the permissions for the enabledModules directory: /etc/icingaweb2/enabledModules
Do you have a Icinga2 agent on your aws instances? If not, this approach can’t work!
I would try to use a check against the AWS API to get this data and put the service using the check into the template of the hosts that the Director creates from the icingaweb2 aws module import source.
alternatively you can try to use SNMP or automate the installation of the Icinga2 agent on your AWS hosts.