Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Apr 23, 2017 9:06 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Enabling the ditor on fresh install
PostPosted: Sun Aug 28, 2016 11:01 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Hi,

I'm trying to do a fresh install on a new server. Using Ubuntu 16.04 LTS, the Ubuntu repository version of Cacti (0.8.8f) and Network Weathermap 0.98 from here: https://github.com/howardjones/network- ... p-0.98.zip
I manage to follow the installation instructions found here: http://network-weathermap.com/manual/0. ... ditor.html
Installing and enabling network weathermap itself works fine, but then I get to the part where I'm supposed to enable the editor.

Quote:
Copy the editor-config.php-dist file to editor-config.php

I can't find any such file on my server or in the zip file for network weathermap at all. Where is it supposed to be? Directly in the weathermap dir? In the editor-resources? Separate download? :)


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Aug 28, 2016 11:13 pm 
Offline
Cacti User

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 58
I don't quite remember now but, if you have a look at weathermap-cacti-plugin-editor.php file, it tells you what file is currently using (editor.php).

_________________
Cacti - 0.8.8h
Poller Type - CMD
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 6
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Mon Aug 29, 2016 2:03 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 161
Don't you have a file call editor.php inside your weathermap directory ?
Inside it you have to set the $ENABLED to true to be able to use the editor online.

_________________
CentOS
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Mon Aug 29, 2016 11:48 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Rno wrote:
Don't you have a file call editor.php inside your weathermap directory ?
Inside it you have to set the $ENABLED to true to be able to use the editor online.


Yes I do, but the way it is built, as long as the editor is loaded in the Cacti UI it doesn't care about wether $ENABLED is true or not to start with.

Pucho wrote:
I don't quite remember now but, if you have a look at weathermap-cacti-plugin-editor.php file, it tells you what file is currently using (editor.php).


Yes, the editor itself is editor.php.

But I'm looking for a config file that's supposed to be present. Here's the relevant part from the manual:

Quote:
Once you have weathermap itself working, continue onto the editor:

Copy the editor-config.php-dist file to editor-config.php. If you want to be able to pick data sources from your Cacti installation by name, edit the file and make sure that the line that sets $cacti_base is correct, and that the base URI below that is also correct for your Cacti installation (these two lines are marked CHANGE in the file).

....

Since version 0.98, you no longer need to edit the editor.php to enable it unless you want to use the editor outside of Cacti. Otherwise, you can edit existing maps by clicking on their name in the list of maps in the Cacti Manage..Weathermaps page, or by clicking the 'Weathermap Editor' link at the bottom of the page to create new maps or edit maps not currently being used.

You will need to have the Cacti permission 'Edit Weathermaps' to be able to do this.


Last edited by malgoe on Mon Aug 29, 2016 12:04 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Mon Aug 29, 2016 11:56 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
OK this is weird. I can actually open the editor from cacti. I can also make changes to the original "simple.conf". But I cannot add a new map or create a new one based on simple.conf. When I click create the page just reloads and nothing happens.

Also, when trying to add a weathermap under Console -> Weathermaps -> Add, I'm just presented with a blank page if I try to add simple.conf.

I tried setting logging to DEBUG but I get nothing relevant, just the old "WEATHERMAP: Poller[0] Weathermap 0.98 starting - DEBUG mode is on " and "WEATHERMAP: Poller[0] DEBUG: [weathermap_memory_check@poller-common.php:11] MEM Initial: memory_get_usage() says 4.6MBytes used. Limit is 512M "


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Tue Aug 30, 2016 1:09 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 161
I don't know if you can create a map directly from the editor!
Just create a file on CLI, or copy the simple.conf, than under the GUI I add it, and then I'm able to edit it.
And watch for the user right otherwise Cacti will fill your log with error and give you some timeout.

_________________
CentOS
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Wed Aug 31, 2016 3:54 pm 
Offline
Cacti User

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 58
malgoe wrote:
OK this is weird. I can actually open the editor from cacti. I can also make changes to the original "simple.conf". But I cannot add a new map or create a new one based on simple.conf. When I click create the page just reloads and nothing happens.

Also, when trying to add a weathermap under Console -> Weathermaps -> Add, I'm just presented with a blank page if I try to add simple.conf.

I tried setting logging to DEBUG but I get nothing relevant, just the old "WEATHERMAP: Poller[0] Weathermap 0.98 starting - DEBUG mode is on " and "WEATHERMAP: Poller[0] DEBUG: [weathermap_memory_check@poller-common.php:11] MEM Initial: memory_get_usage() says 4.6MBytes used. Limit is 512M "



Don't freat out.
You can open the web editor because all you needed was already in place. Doc might be a little bit out of date.
Everytime you create a new map from web editor be sure you are adding .conf at the end, eg sarasa.conf

And you have to check file permissions on weathermap/configs to be writable by the httpd username, probably a chown -R cacti.apache configs (this may be different for you) and chmod 0775 configs will do it. There is a section on the official doc regarding this.

Every installation is a new world =d

Cheers

_________________
Cacti - 0.8.8h
Poller Type - CMD
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 6
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 2:56 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Pucho, thank you for the tips. But I have already done chown -R www-data configs and chmod u+w configs
(www-data is the apache user on a ubuntu system). And since I can edit the already existing simple.conf that means I'm allowed to edit things in the config folder.

Any other ideas? :-?


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 3:35 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Half the problem solved. I am allowed to create new weathermaps if only I add ".conf" in the filename. I'm pretty sure that was not necessary in earlier versions, but hey. It works. :D

Now there's just one problem left, adding the weathermap I created to be created by cacti.
Under Console -> Weathermaps -> Add, if I click "Add" for any map I get a blank page and no map is added. However if I click "view" I do get the config for the map, so that works.

EDIT:
So I've been using Firefox for this. If I use Chrome instead I actually get an HTTP error 500 when i click "Add".


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 3:43 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Yay, for this latest problem of adding a weathermap I actually get some error output in apaches error.log. Here you go:

Quote:
[Sun Sep 04 10:42:19.091503 2016] [:error] [pid 25988] [client <clientIP>:60480] PHP Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /usr/local/share/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php:837\nStack trace:\n#0 /usr/local/share/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php(274): add_config('AndelainHQ.conf')\n#1 {main}\n thrown in /usr/local/share/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 837, referer: http://<serverIP>/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=addmap_picker


I'm also getting some errors while picking data sources form cacti in the editor. Here's one example:

Quote:
[Sun Sep 04 10:29:54.899548 2016] [:error] [pid 25906] [client <clientIP>:60162] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /usr/local/share/cacti/plugins/weathermap/cacti-pick.php:69\nStack trace:\n#0 {main}\n thrown in /usr/local/share/cacti/plugins/weathermap/cacti-pick.php on line 69, referer: http://<serverIP>/cacti/plugins/weathermap/cacti-pick.php?host_id=2&command=link_step1&overlib=1&aggregate=0


The errors seem related, that some sql functions are missing. Could it be a missing package?

EDIT: It seems they are related to my PHP version. I'm on PHP 7, but I could have sworn I saw somewhere that weathermap was updated to handle that. Can't find it now though... :/

Guess I'm looking for some way to make weathermap work with PHP 7 then. :) Any suggestions?


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 4:55 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5081
Location: United Kingdom
PHP 7 is the problem. The mysql_*** functions no longer exist. I'm working on replacing all the database code with PDO-based at the moment - there's quite a lot of it, but I'm about 70% through. 0.98a should have those changes.

For the editor in 0.98, you no longer need to do anything to have it work with Cacti and the admin user. For other users, you need to give the the "edit weathermaps" permission in Cacti. For other non-Cacti setups, you still need to edit files.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 5:09 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Howie, thanks for your reply.

Are we talking days, weeks, or months for 0.98a? ;)


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 5:29 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5081
Location: United Kingdom
Yes. ;-)

Seriously: Weeks, I think. Summer vacations are nearly over and I'll get the time to finish the work.

I would be surprised if you don't have other Cacti issues with 7.0 too though. I had a few.

https://network-weathermap.com/2016/09/04/september-2016-current-issues/

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 7:08 am 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Cannot promise any contributions, but what branch is for 0.98a? Database-refactor?


Top
 Profile  
 
 Post subject: Re: Enabling the ditor on fresh install
PostPosted: Sun Sep 04, 2016 7:15 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5081
Location: United Kingdom
malgoe wrote:
Cannot promise any contributions, but what branch is for 0.98a? Database-refactor?


0.97-maintenance is the branch for 0.98 releases, but the database changes (current work-in-progress) are in database-refactor, yes.

0.97-maintenance already has a bunch of other changes for performance - mainly a new map config reader that I wrote a while ago but didn't make it into a release.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 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