Graphite error: Could not resolve host: icingaweb2

(Milos Denic) #1

Hi Guys,
I installed Graphite and I have a error: Could not resolve host: icingaweb2.
1
My settings:
8080
cfg
Can anyone please help me to resolve this issue ?

#2

I also had this message recently. But I`m not sure how I fixed it.

Please try/check a few things:

  • Is the web server listening on port 8080?
  • have you tried adding http:// to the URL?
  • try setting the character set of the icinga ido db resource to “latin1”
(Milos Denic) #3

Hi Log1c and thank you very much for fast and kind help.
We make some progress :D, now error is : Failed to connect to 10.0.0.10 port 8003: Connection refused.
These are screenshots:
F1
f2
f3


image
I can’t figure out what is wrong, port is opened…
Is there any Graphite config file where we can see and change settings ?

#4

Reading through your posts again, I think you are mixing up some things.

What distribution are we talking about?
Is graphite/graphite-web installed on the same host like icinga2?

The graphite writer, configured in /etc/icinga2/features-enabled/graphite.conf, defines were Icinga2 sends the performance data, aka where graphite is installed and stores it’s data (in whisper files for example). This is by default localhost and port 2003, as it is assumed that you installed it on the same system and didn’t change the listening post of the carbon-cache service.

Graphite-Web is what you have to configure in the graphite-module to get the graphs display. This is a website running on a webserver. By default it is deployed via port 80. If you want to change that you have to configure it in the corresponding config file in the webservers config folder.

Maybe just do a quick search on the internet on how to install graphite for icinga2, there are various how tos for different distributions.

I would change the port of the graphite writer back to 2003, if you haven’t manually configured something else while setting up graphite/carbon-cache. Also no http needed here, as this has nothing to to with the webinterface.

Then check what port the graphite-web interface is running on. Check what opening http://10.0.0.10 displays in your browser. Try the different ports (if you also have changed them manually while setting up graphite)

(Milos Denic) #5

Hi Log1c,

Thank you for detailed explanation.
I have to admit that I do not have much experience with Icinga2 modules.
Also I still not found normal instructions how to install graphite for icinga2.

#6

Here is what I am doing when installing graphite&graphite-web on Ubuntu18.04 and the same host as icinga2 is running on. I’m not sure if there is anything missing, I just copied it out of the history of the last install, so no guarantees here :wink:

Command history
GRAPHITE INSTALLATION UBUNTU 18.04 LTS (python2)


apt install graphite-web graphite-carbon libapache2-mod-wsgi
vi /etc/graphite/local_settings.py
	EDIT SECRET_KEY, TIME_ZONE 

vi /etc/default/graphite-carbon
	CARBON_CACHE_ENABLED=true
	
graphite-manage migrate
sudo chown _graphite. /var/lib/graphite/graphite.db

echo Listen 8000 >> /etc/apache2/ports.conf
cp /usr/share/graphite-web/apache2-graphite.conf /etc/apache2/sites-available/graphite.conf
sed -i.org -e "/VirtualHost/s/:80/:8000/" /etc/apache2/sites-available/graphite.conf
a2ensite graphite
service apache2 restart

vi /etc/carbon/storage-schemas.conf
	[icinga2_metadata]
	pattern = ^icinga2\..*\.metadata\.
	retentions = 5m:10d,30m:90d,360m:4y

	[icinga2_perfdata]
	pattern = ^icinga2\..*\.perfdata\.
	retentions = 5m:10d,30m:90d,360m:4y
	
chown _graphite._graphite /var/log/graphite/ -R
systemctl stop apache2.service
systemctl start apache2.service
icinga2 feature enable graphite
vi /etc/icinga2/features-enabled/graphite.conf
	enable_send_thresholds = true

systemctl restart icinga2.service
cd /usr/share/icingaweb2/modules/
git clone -b v1.1.0 --single-branch https://github.com/Icinga/icingaweb2-module-graphite.git graphite

There is a good webinar on the topic by Netways (but it is in german), maybe watch it a take a look at the steps and compare them to what you have done.

Some good how tos for different distributions (english & german :man_shrugging:, maybe use a translator) ((careful, some are quite old!))


https://www.antonissen.net/2017/02/19/monitoring-your-network-with-icinga-2-part-5/
https://www.christian-klemm.de/icingaweb2-graphite-modul/
https://confluence.alitecs.de/pages/viewpage.action?pageId=18284583
https://dokuwiki.nausch.org/doku.php/centos:web_c7:icinga:graphite

1 Like
(Milos Denic) #7

Thank you very mush for kind explanations and help.
I will check everything