Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 25, 2019 7:02 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Weathermap permnissions
PostPosted: Thu Aug 21, 2014 5:12 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
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).

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Sun Aug 24, 2014 4:14 am 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
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 ;)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Sep 02, 2014 11:19 am 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
Do you have any ideas where to look , I would like to trace how weathermap script is being initiated.


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Sep 02, 2014 1:01 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
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.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Thu Sep 04, 2014 2:23 pm 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
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 ?


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Sep 09, 2014 7:18 am 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
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.


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Sep 09, 2014 7:26 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
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.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Thu Sep 11, 2014 11:03 am 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
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:
#!/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


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Fri Sep 12, 2014 10:02 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
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.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Fri Sep 12, 2014 12:36 pm 
Offline

Joined: Wed Aug 20, 2014 11:06 am
Posts: 17
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.


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Sun Apr 23, 2017 11:38 pm 
Offline

Joined: Sun Apr 23, 2017 2:17 am
Posts: 3
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


Attachments:
Weathermap.png
Weathermap.png [ 31.32 KiB | Viewed 1481 times ]
Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Mon Apr 24, 2017 4:22 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
Please show the permissions (ls -ld output/ then ls -l output/ )

Which user does the cacti poller run as?

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Mon Apr 24, 2017 9:11 pm 
Offline

Joined: Sun Apr 23, 2017 2:17 am
Posts: 3
Howie wrote:
Please show the permissions (ls -ld output/ then ls -l output/ )

Which user does the cacti poller run as?


The user is admin.

Hi Howie, I ran the commands you gave me and this is the result ...


Attachments:
Weathermap3.PNG
Weathermap3.PNG [ 18.97 KiB | Viewed 1400 times ]
Weathermap2.PNG
Weathermap2.PNG [ 17.61 KiB | Viewed 1400 times ]
Weathermap.png
Weathermap.png [ 51.21 KiB | Viewed 1403 times ]
Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Apr 25, 2017 7:26 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
No, not the user inside Cacti. What linux user runs the Cacti poller.php process?

The output directory should be owned by that user.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Weathermap permnissions
PostPosted: Tue Apr 25, 2017 4:00 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5300
Location: United Kingdom
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.98 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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group