Weathermap 1.0 rebuild script destroy the map conf file.....

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
liorh007
Posts: 13
Joined: Mon May 23, 2016 6:37 am

Weathermap 1.0 rebuild script destroy the map conf file.....

Post by liorh007 »

Hello

i have a strange phenomena with my weather map rebuild script.
i have installed the plugin on my cacti 1.2.24 and added the maps config files from my old 0.8.8 cacti
and started the weathermap-cacti-rebuild.php script in the cron at 5 min. intervals

but for some strange reason only part of the maps showed up on the weathermap page but some were left blank.
when i checked the blanked missing maps config file , i saw that all the config was gone
and the only lines that survived were the lines of the ICONS. (se end of the post)
I have reinstalled the plugin and it didn't help.
I don't understand
1. why some maps are not effected and some are being destroyed .
2. why the rebuild even write to the conf file.

this happens every time even after d/l and reinstalling the plugin.

that is all that is left from the content of the conf file

M7I-02.conf
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/juniper-mx80.png
ICON images/juniper-mx80.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/Juniper-m7i_b.png
ICON images/juniper-mx80.png
ICON images/juniper-mx80.png


i run centos 7.9 & php 7

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

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Howie »

Where did you get your weathermap from?

The "normal" (from 0.98) weathermap-cacti-rebuild.php doesn't write to map config files.

Also, unless you have turned off weathermap update interval in the Cacti Settings, it should rebuild maps by itself when the poller runs, without a separate cronjob.
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!)
liorh007
Posts: 13
Joined: Mon May 23, 2016 6:37 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by liorh007 »

Hello Howie,
thank you for your reply
Howie wrote: Wed Jun 07, 2023 12:49 pm Where did you get your weathermap from?
i got the weathermap from this link which i found in one of the weathermap posts in this forum

i was pointed to this version of weathermap from TheWitness

https://github.com/Cacti/plugin_weather ... s/tag/v1.0

i just rechecked and i'm using the version above from TheWitness

Do you know of a different version that works with cacti 1.2.24 i can work with?
Howie wrote: Wed Jun 07, 2023 12:49 pm The "normal" (from 0.98) weathermap-cacti-rebuild.php doesn't write to map config files.
i know i have 0.98 with my cacti 0.8.8 and it never writes to the map files.
this is why it was very strange for me.
Howie wrote: Wed Jun 07, 2023 12:49 pm Also, unless you have turned off weathermap update interval in the Cacti Settings, it should rebuild maps by itself when the poller runs, without a separate cronjob.
i had a problem when the weathermap was running with the poller so i changed it to run thru the cron every 5 min.
and it works great on my cacti 0.8.8.
(my poller runs every minute and the weathermap wasn't able to keep up,
so you told me then (some years ago) to split it into cron. )
when i'll get the weathermap working without a problem , ill try to run it with the poller as you wrote since i have a very strong server now.

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

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Howie »

Ah OK, then sounds like one for TheWitness - sorry! :-D
I knew he was working on updating it, but I didn't know what it was called.
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!)
liorh007
Posts: 13
Joined: Mon May 23, 2016 6:37 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by liorh007 »

Howie,

do you know of a different version that works with cacti 1.2.24?
i heard there was a "fix" for version 0.98a
but i failed to find it.
maybe it would work for me.

update:
i have found that vesion 0.98a that works with 1.2.X
however after installing the plugin i cant get into it
it say 401 permision denied.

however i can't find the place where i can change the permissions so i can enable myself access to weather map.
i cant find the weathermap tag in the permisson to web page

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

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Howie »

The version from TheWitness is the new standard, once he is finished.

The other one that other people seem to have some success with in Phalek's from these forums, which is 0.98a changed for Cacti 1.x.
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!)
liorh007
Posts: 13
Joined: Mon May 23, 2016 6:37 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by liorh007 »

Howie wrote: Thu Jun 08, 2023 7:02 am The version from TheWitness is the new standard, once he is finished.

The other one that other people seem to have some success with in Phalek's from these forums, which is 0.98a changed for Cacti 1.x.
Hello Howie

I have downloaded the Phalek's version (i hope)
and installed it.
however i get the same overwriting of the map file leaving it unusable !
it only happens when i give write permissions on the map file to the group.
it happens both when i rebuild from the cacti menu or when running from Poller/CLI/CRON
if i set it as a read only then it creates the map on the weathermap page.
and does not change the file.
it does that on the start since after it it say that it can't understand what it written in the file
since it contains only the lines i have wrote above.
also it only effects the maps which where selected to be displayed on the weathermap page,
i have no idea what is going on , nor how to check why it does that?

its the same effect as thewitness version.

is there a debug more that can show me what its doing?
and why it writes to the file that it should only read from?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Howie »

I believe it uses the Cacti logging settings, so setting Debug logging there will tell you more (but probably be bad for performance if you are on 1-minute polling)

Really curious about this one! It's not often people find whole new failures like this :-)

It might be worth testing just one map from the command-line, the old way:

php weathermap --config your-config-file.conf --debug

They both use the same code to do their work, so you should see the same issue there, and it won't be in your poller.
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!)
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Osiris »

The 1.0 on the cacti GitHub will move the files to new directories and it fit does not have write access into the images folder, bad things happen.
Before history, there was a paradise, now dust.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by Osiris »

I think that's noted in the readme.
Before history, there was a paradise, now dust.
liorh007
Posts: 13
Joined: Mon May 23, 2016 6:37 am

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by liorh007 »

Osiris wrote: Wed Jul 26, 2023 9:21 pm The 1.0 on the cacti GitHub will move the files to new directories and it fit does not have write access into the images folder, bad things happen.
can you please explain where would the files move ?
and where is the new image directory ?
i have made all the cacti tree with owner cacti:netadm + 777 mode and it didn't work
so if i know the directories and what this version does with/to the files
ill might be able to "fix it" on my system

thank you
User avatar
TheWitness
Developer
Posts: 16897
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Weathermap 1.0 rebuild script destroy the map conf file.....

Post by TheWitness »

The files will be moved to one of three folders:

weathermap/images/background - For backgrounds
weathermap/images/objects - For your various images like routers, etc.
weathermap/images/icons - Not currently used from what I can tell, but has some old images in it
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests