Active IQ Unified Manager Discussions

Grafana and netapp-harvest error

Johann_ohne_Land
3,595 Views

Hello,

 

I followed the instructions in the IAG  and installed

Netapp harvest 1.6.1

Grafana 7.3.6

Latest Graphite and Carbon-cache from GIT.

Installtion worked fine up to running 

 

/opt/netapp-harvest/netapp-manager -import

here I get the following errors

 

"[OK ] Line [29] is Section [global]
[OK ] Line [30] in Section [global] has Key/Value pair [grafana_api_key]=[**********]
[OK ] Line [31] in Section [global] has Key/Value pair [grafana_url]=[x.y.z.a:3000]
[OK ] Line [37] is Section [default]
[OK ] Line [38] in Section [default] has Key/Value pair [graphite_server]=[x.y.z.a]
[OK ] Line [39] in Section [default] has Key/Value pair [username]=[netapp-harvest]
[OK ] Line [40] in Section [default] has Key/Value pair [password]=[**********]
[OK ] Line [43] in Section [default] has Key/Value pair [send_autosupport_stats]=[0]
[OK ] Line [68] is Section [Cluster1]
[OK ] Line [69] in Section [Cluster1] has Key/Value pair [hostname]=[a.b.c.d]
[OK ] Line [70] in Section [Cluster1] has Key/Value pair [group]=[Lab1]
[OK ] Line [82] is Section [Ocum]
[OK ] Line [83] in Section [Ocum] has Key/Value pair [hostname]=[e.f.g.h]
[OK ] Line [84] in Section [Ocum] has Key/Value pair [group]=[Lab2]
[OK ] Line [85] in Section [Ocum] has Key/Value pair [host_type]=[OCUM]
[OK ] Line [86] in Section [Ocum] has Key/Value pair [data_update_freq]=[900]
[OK ] Line [87] in Section [Ocum] has Key/Value pair [normalized_xfer]=[gb_per_sec]
[OK ] Will import dashboards to [x.y.z.a:3000]
[OK ] Dashboard directory is [/opt/netapp-harvest/grafana]
Use of uninitialized value $addr in pattern match (m//) at /opt/netapp-harvest/netapp-manager line 145.
Use of uninitialized value $addr in gethostbyname at /opt/netapp-harvest/netapp-manager line 155.
Use of uninitialized value $addr in concatenation (.) or string at /opt/netapp-harvest/netapp-manager line 162.
[ERROR ] Unable to resolve name
[ERROR ] Exiting due to fatal error."

 

Harvest is running fine, I can see the data in Grapite webapp itself, the wsp files and other data files get updated properly.

I don't see anything in Grafana though, the Netapp Dashboards are not there, and of cause no data.

 

Anyone a hint what I'm missing and what the error means.

 

Thanks

 

4 REPLIES 4

Johann_ohne_Land
3,533 Views

Quick update

 

I manually imported the json files to Grafana and can see all the data now.

 

If someone has an idea why the netapp-manager import failed, please let me know.

yannb
3,445 Views

x.y.z.a is you replacing the server name in the logs right ?

 

I'm assuming in [global] section there is an error in grafana_url.

This should be an actual URL, not just an ip address or host name (with http(s):// and all...)

Johann_ohne_Land
3,361 Views

Hello x.y.z.a is a replacement for the correct IP.

I actually tried http://x.y.z.a:3000 and https://x.y.z.a:3000 as well localhost:3000, same results.

Manually importing the json files worked though.

i will do some further checking and keep you posted.

yannb
3,358 Views

For reference, this is the relevant portion of code :

 

        if ($conf{global}{grafana_url} =~ m!^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?!)
	{
		$addr = $4;
		$port = 80 if ($2 eq 'http');
		$port = 443 if ($2 eq 'https');
		if ($addr =~ /(.*):(\d{1,5})/)
		{
			($addr, $port) = ($1, $2);
		}
	}

It looks like $addr is undefined, so the regexp matched but group $4 is empty for some reason.

 

In the logs you posted it makes sense because you didn't put protocol://

Let's do the same thing with http://grafana-ip:3000/ instead.

Public