Icons not changes when node down/up

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

Then it is probably not getting data from your rrd file at all. What do the logs say?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Mon Jan 25, 2021 4:22 am The scale probably is - it will show a red label when traffic gets to 0.
I don't know where's my mistake, i have tried a bunch of methods. And not work arr((

There one, i have two images poligon_black, poligon_white in folder images. When traffic equal 0, node down and changes icon, but... ahh(

This is my curse

SCALE updown 0 0.01 255 0 0 white
SCALE updown 0.01 0.1 0 128 0 black
SCALE updown 0.1 100 0 128 128 black

NODE 5
INFOURL http://192.168.118.128/device/device=5/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... ce_bits&le>
ICON images/poligon_{node:this:inscaletag}
TARGET ./192.168.118.134/port-id2.rrd:poligon:-
USESCALE updown in
POSITION 178 104

NODE 6
INFOURL http://192.168.118.128/device/device=6/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... ce_bits&le>
ICON images/poligon_{node:this:inscaletag}
TARGET ./192.168.118.134/port-id2.rrd:poligon:-
USESCALE updown in
POSITION 626 121
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Mon Jan 25, 2021 4:45 am Then it is probably not getting data from your rrd file at all. What do the logs say?
one moment pls
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Mon Jan 25, 2021 4:45 am Then it is probably not getting data from your rrd file at all. What do the logs say?
Howie, all works! icons changes (and node colour)! but, when i start traffic, weathermap display me, that traffic max (last clour). i pinging from my virtual machine to virtual machine "ping 192.168.118.132 -s 36000"

I suspect, work only min and max. Do You have any ideas? Thanks.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

I don't understand.

Sounds like maybe you are using the wrong DS names still. AGAIN, look in the logs and you will see warnings if the names are wrong, and a list of the possible names.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Mon Jan 25, 2021 8:51 am I don't understand.

Sounds like maybe you are using the wrong DS names still. AGAIN, look in the logs and you will see warnings if the names are wrong, and a list of the possible names.
Now i understand what you mean under DS. Now i reading about rrd and rrdtools.
Now we have:
-GAUGE
-COUNTER
-DERIVE
-ABSOLUTE.
Maybe yes i using wrong DS.
Between ubuntu and debian (this is my nodes) i use port-id2.rrd:INOCTETS:OUTOCTET

Which command i must use to check the logs?

I open port-id2.rrd, and there is a part from file:

filename = "port-id2.rrd"
rrd_version = "0003"
step = 300
last_update = 1611648902
header_size = 20888
ds[INOCTETS].index = 0
ds[INOCTETS].type = "DERIVE"
ds[INOCTETS].minimal_heartbeat = 600
ds[INOCTETS].min = 0.0000000000e+00
ds[INOCTETS].max = 1.2500000000e+10
ds[INOCTETS].last_ds = "252685568"
ds[INOCTETS].value = 1.0783864009e+05
ds[INOCTETS].unknown_sec = 0
ds[OUTOCTETS].index = 1
ds[OUTOCTETS].type = "DERIVE"
ds[OUTOCTETS].minimal_heartbeat = 600
ds[OUTOCTETS].min = 0.0000000000e+00
ds[OUTOCTETS].max = 1.2500000000e+10
ds[OUTOCTETS].last_ds = "252862351"
ds[OUTOCTETS].value = 1.0791181950e+05
ds[OUTOCTETS].unknown_sec = 0
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

I don't know where librenms keeps logs.

But a good first guess would be

TARGET ./192.168.118.134/port-id2.rrd:INOCTETS:OUTOCTETS

then
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Tue Jan 26, 2021 3:34 am I don't know where librenms keeps logs.

But a good first guess would be

TARGET ./192.168.118.134/port-id2.rrd:INOCTETS:OUTOCTETS

then
I check logs, here is:


====================================
Component | Version
--------- | -------
LibreNMS | 1.70.1-52-g4ba095853
DB Schema | 2020_11_02_164331_add_powerstate_enum_to_vminfo (191)
PHP | 7.4.9
Python | 3.8.6
MySQL | 10.3.25-MariaDB-0ubuntu1
RRDTool | 1.7.2
SNMP | NET-SNMP 5.8
====================================

[OK] Composer Version: 2.0.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
html/images/librenms_logo_dark.svg
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/html/images/librenms_logo_dark.svg
/opt/librenms/html/plugins/Weathermap/images/poligon_white.png
/opt/librenms/html/plugins/Weathermap/images/poligon_black.png
/opt/librenms/html/plugins/Weathermap/images/poligon.png
/opt/librenms/html/plugins/Weathermap/images/small_city.png
/opt/librenms/html/plugins/Weathermap/images/big_city.png
/opt/librenms/html/plugins/Weathermap/images/home.png


Then, i entered this commands wheres [FAIL], and here we go:

====================================
Component | Version
--------- | -------
LibreNMS | 1.70.1-52-g4ba095853
DB Schema | 2020_11_02_164331_add_powerstate_enum_to_vminfo (191)
PHP | 7.4.9
Python | 3.8.6
MySQL | 10.3.25-MariaDB-0ubuntu1
RRDTool | 1.7.2
SNMP | NET-SNMP 5.8
====================================

[OK] Composer Version: 2.0.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
html/images/librenms_logo_dark.svg
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
storage/framework/testing/.gitignore
storage/framework/views/.gitignore
storage/logs/.gitignore
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Found answer
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Good day Howie, can You tell me please, h-m-m-m, we have one big sity, sity #1, and we have two links connected to this sity #1, there city #2, and city #3. When the city #2 or city #3 is down, the icon of city #1 changes in orange, when down two cities, icon city #1 is red (but, when two cities up - icon city #1 is green). How we can do that? I think we must have two RRD, rigth? But which one (or both) me must choose in config node (city #1)? Thank You for answer.
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Icons not changes when node down/up

Post by Atreides »

For CITY icon red or green(assuming CITY = a host in cacti ), use this code :

NODE CITY1
ICON images/city-{node:this:state}.png <---you will need 2 .png's in images : city-up.png and city-down.png).
TARGET cactihost:261 <-- here weathermap will display city-up.png if the host with ID 261 is UP.
USESCALE cactiupdown in percent <--- to color your node ( green or red ).
POSITION 200 200
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Atreides wrote: Fri Feb 05, 2021 1:39 pm For CITY icon red or green(assuming CITY = a host in cacti ), use this code :

NODE CITY1
ICON images/city-{node:this:state}.png <---you will need 2 .png's in images : city-up.png and city-down.png).
TARGET cactihost:261 <-- here weathermap will display city-up.png if the host with ID 261 is UP.
USESCALE cactiupdown in percent <--- to color your node ( green or red ).
POSITION 200 200
i dont know where i can get TARGET for my node )= i use librenms
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests