I have graphite (not graphite web) installed and a working graphite server.
I have the connection to it setup as per https://icinga.com/docs/graphite/latest/doc/02-Installation/ conf file.
In /var/log/icinga2/icinga2.log I get:
[2019-07-30 20:09:42 -0700] critical/GraphiteWriter: Exception during Graphite operation: Verify that your backend is operational!
[2019-07-30 20:09:52 -0700] critical/TcpSocket: getaddrinfo() failed with error code -2, “Name or service not known”
Context:
(0) Reconnecting to Graphite ‘graphite’
[2019-07-30 20:09:52 -0700] critical/GraphiteWriter: Can’t connect to Graphite on host ‘10.100.199.179`’ port ‘2003’.
Context:
(0) Reconnecting to Graphite ‘graphite’
Now I can send data using NC straight from the icinga2 host to the graphite host using the classic graphite test:
$ echo "icinga2.random.diceroll 4 date +%s" | nc 10.100.199.179 2003
What part of Icinga2 would be getting ’ Can’t connect to Graphite on host’ refusal / messages.
Firewall and all is good as I can send the test data just fine using netcat.
I am looking to send all my data offboard and not have it on the icinga2 host system itself so graphite and all that is on another system. I am not lookign to display the data back on icingaweb2 today.
which versions of Icinga and Graphite are involved here?
The graphite feature inside Icinga tries to open the TCP socket, and keep it open during metric transmission. This is to avoid opening a connection on each single metric.
The error returned by the TcpSocket class is low level with DNS resolving.
getaddrinfo() failed with error code -2, “Name or service not known”
Can you try the FQDN instead of the IP address to rule out possible errors here?
My mistake. There was a typo and a single character I missed in the graphite.conf that was causing the error. I fixed that I can see data in my graphite system now.
Thanks for the help.