Weathermap permnissions
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
Nothing at all in the cacti.log? Even with no maps, you should get one or two lines (unless quiet logging is enabled in the Weathermap settings in Cacti).
But: you do get the Manage..Weathermaps page? And you do have a list of maps in that page?
That indicates that the plugin is installed OK, and the database tables exist (otherwise you would have no maps listed).
But: you do get the Manage..Weathermaps page? And you do have a list of maps in that page?
That indicates that the plugin is installed OK, and the database tables exist (otherwise you would have no maps listed).
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!)
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!)
Re: Weathermap permnissions
Weathermap management works fine , i can see my added maps listed. Nothing in cacti log, weathermap "chatty"chatty logging enabled , cacti debug log enabled. No maps are generated. I am using editor and i see config is saved properly , i have edited weathermap script so it can display name of thumbnail. Then i used cli to manually generate it. When doing it manually all works fine. I am suspecting that there is some issue with calling weathermap script by cacti poller, need to have a look into cmd.php , but you probably know how it works so if you give some tips that will save my time on reverse engineering troubleshooting
Re: Weathermap permnissions
Do you have any ideas where to look , I would like to trace how weathermap script is being initiated.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
The weathermap *script* isn't initiated. Parts of the weathermap plugin are called by the Cacti plugin architecture.
I guess you need to look at the plugin_* database tables to check if there is a weathermap entry for the poller_bottom hook.
I guess you need to look at the plugin_* database tables to check if there is a weathermap entry for the poller_bottom hook.
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!)
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!)
Re: Weathermap permnissions
Hah , didn't know about that, ok so here are my findings.
1. In the Plugin Management I can see Weathermap with type "old PIA"
2. In the cacti database , I have displayed plugin_config table and weathermap is not there
3. In the cacti database , I have displayed plugin_realms and I can see weathemap displays there
Is this correct ?
1. In the Plugin Management I can see Weathermap with type "old PIA"
2. In the cacti database , I have displayed plugin_config table and weathermap is not there
3. In the cacti database , I have displayed plugin_realms and I can see weathemap displays there
Is this correct ?
Re: Weathermap permnissions
So I have found sort of workaround , first I gather info about current maps and their filehash from database, then I run command weathermap from a script specifying config files and html output , at the end I use convert to generate thumbnails for existing maps. I agree its very dirty way but I havent found solution for my problem.
PS. All works fine when I generate html manually , when I dod that from script using exactly the same commands , html file is not being diplayed , it has slighlty larger size , I had a glance on the content and it looks the same as when generate manually from cli. So I got stuck again. Need to look at it again today.
PS. All works fine when I generate html manually , when I dod that from script using exactly the same commands , html file is not being diplayed , it has slighlty larger size , I had a glance on the content and it looks the same as when generate manually from cli. So I got stuck again. Need to look at it again today.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
There's actually already a command-line script to use the cacti database settings... check out cacti-weathermap-rebuild.php
This does what the poller does, but from the command line.
This does what the poller does, but from the command line.
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!)
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!)
Re: Weathermap permnissions
It seems that everything works when the maps are generated using weathermap *script* when it's generated withing the folder, so I actually ended up with following script running every hour (probably I will modify it in a way that it only acts upon config change for particular map):
Code: Select all
#!/bin/bash
#
path=/var/www/cacti/plugins/weathermap/
pathcfg=/var/www/cacti/plugins/weathermap/configs/
bin=/var/www/cacti/plugins/weathermap/weathermap
pathout=/var/www/cacti/plugins/weathermap/output/
mysql --skip-column-names --user='root' --password='XXXXX' --database='cacti' --execute='select configfile,filehash from weathermap_maps' > "$path"weathemap_maps_list
mapslist="$path"weathemap_maps_list
if [ -f $mapslist ]
then
while read maps
do
config=$(echo $maps | awk '{$NF=""; print $0}')
map=$(echo $maps | awk '{print $NF}')
cd /var/www/cacti/plugins/weathermap/
./weathermap --config configs/$config --output output/$map.png --htmloutput output/$map.html #--debug
sleep 5
convert -thumbnail 300x300 $pathout$map.png $pathout$map.thumb.png
done < $mapslist
fi
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
Yeah, weathermap-cacti-rebuild.php does that for you. I still don't see why the regular poller function isn't called though.
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!)
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!)
Re: Weathermap permnissions
Me neither, but at least I have workaround that works pretty well.
I would like to thank you for all help and suggestions, now I can proceed with installation of nagios plugin and more.
I would like to thank you for all help and suggestions, now I can proceed with installation of nagios plugin and more.
Re: Weathermap permnissions
Hello,
I have a problem with the Weathermap plugin. I did all the steps but I still do not see the map.
The warning is displayed:
Last Completed Run: Sun, 23 Apr 17 23:20:01 -0500: 0 maps were run in 0 seconds with 1 warnings. (Permissions problem prevents any maps running WMPOLL06)
I already gave permissions to the folders as they have suggested but I still do not see the network map.
What I can do ?
Thank you
I have a problem with the Weathermap plugin. I did all the steps but I still do not see the map.
The warning is displayed:
Last Completed Run: Sun, 23 Apr 17 23:20:01 -0500: 0 maps were run in 0 seconds with 1 warnings. (Permissions problem prevents any maps running WMPOLL06)
I already gave permissions to the folders as they have suggested but I still do not see the network map.
What I can do ?
Thank you
- Attachments
-
- Weathermap.png (31.32 KiB) Viewed 6792 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
Please show the permissions (ls -ld output/ then ls -l output/ )
Which user does the cacti poller run as?
Which user does the cacti poller run as?
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!)
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!)
Re: Weathermap permnissions
The user is admin.Howie wrote:Please show the permissions (ls -ld output/ then ls -l output/ )
Which user does the cacti poller run as?
Hi Howie, I ran the commands you gave me and this is the result ...
- Attachments
-
- Weathermap3.PNG (18.97 KiB) Viewed 6711 times
-
- Weathermap2.PNG (17.61 KiB) Viewed 6711 times
-
- Weathermap.png (51.21 KiB) Viewed 6714 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
No, not the user inside Cacti. What linux user runs the Cacti poller.php process?
The output directory should be owned by that user.
The output directory should be owned by that user.
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!)
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap permnissions
Another way to check: do an 'ls -l' in the cacti rra directory. Whatever user owns that directory should also own the output directory. It is probably a user called 'cacti', but it can be different depending on the installation.
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!)
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!)
Who is online
Users browsing this forum: No registered users and 1 guest