Cacti 1.1.36 and Wheatermap dev (no plugin install)

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Author
Message
jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Cacti 1.1.36 and Wheatermap dev (no plugin install)

#1 Post by jhonnyx » Fri Apr 06, 2018 4:25 pm

Apologies in advance,

I am having this issue logged and I went through Howard's guide but surely I am missing something I cannot figure out, can you tell me what from these logs?

04/06/2018 21:21:19 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
04/06/2018 21:21:19 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4629 cacti_debug_backtrace)
thrown in file: /var/www/html/cacti/plugins/weathermap/lib/all.php on line: 15
#4 {main}
#3 /var/www/html/cacti/plugins.php(74): api_plugin_install('weathermap')
#2 /var/www/html/cacti/lib/plugins.php(479): include_once('/var/www/html/c...')
#1 /var/www/html/cacti/plugins/weathermap/setup.php(11): require_once('/var/www/html/c...')
#0 /var/www/html/cacti/plugins/weathermap/setup10.php(19): require_once()
Stack trace:
04/06/2018 21:21:19 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught exception 'Exception' with message 'No autoloader present. Did you read README.md for dev-specific instructions?' in /var/www/html/cacti/plugins/weathermap/lib/all.php:15

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#2 Post by Howie » Fri Apr 06, 2018 4:53 pm

You didn't run "composer install" as mentioned in the README file.
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!)

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#3 Post by jhonnyx » Sun Apr 08, 2018 12:24 pm

Thank you,

I ran into some errors but I will review it and post the outcome of my next installation attempt

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#4 Post by Howie » Sun Apr 08, 2018 2:53 pm

So are you saying that you did run composer? I want to look into adjusting the error detection if so...
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!)

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#5 Post by jhonnyx » Sat Apr 28, 2018 12:12 pm

Howie wrote:So are you saying that you did run composer? I want to look into adjusting the error detection if so...
Hi,

I will try as soon as I can about retrying the installation (had some issues with CACTI and had to fix that first).

Can I ask you if the standalone PHP weathermap can work with CACTI 1.x (without the plugin) ?

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#6 Post by Howie » Sat Apr 28, 2018 2:38 pm

It should be fine... join forces with this thread:
viewtopic.php?f=16&t=58599
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!)

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#7 Post by jhonnyx » Sat Apr 28, 2018 7:45 pm

Thanks in advance, I know these questions can be painful but I read the manual without finding the info I needed.

I succeed on installing the pluging with all requirements from the master git branch, imported the plugin successfully and edited a map.

creating the map I have no alert or issue reported but when I try to browse to it I only have the frame of weathermap with an empty image in the middle.

I tried with PHP 7.2 installed and I got once the a map loaded, but then no more.

Is it a common problem with php or do you suggest to look somewhere else?

On the cacti plugin vs standalone weathermap 0.98 (or the new refactor is ready as standalone?):

I understood that the cacti plugin refresh the graphs by each cacti polling cycle,
- the question is: does it work also with BOOST enabled? I have read of a parameter to add in such cases (from an old version documentation) but I am not sure if it's still actual and necessary with this new plugin

For the 0.98 (or new...) standalone version
- question is : can also this work in case CACTI uses BOOST? as I understood this version requires a cron job to refresh the maps.
Is there any limitation or improvement vs the cacti plugin? Do you consider this as stable to use in a production server?

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#8 Post by Howie » Sun Apr 29, 2018 5:25 am

Standalone won't work with Boost in any version. It needs access to the Cacti poller and database.

I don't understand the middle bit about browsing to a map. You mean inside Cacti? With the github version? That doesn't work yet.

If you use the standalone version to create a map and HTML file, that should work fine.

0.98 and the new version should both work standalone. The remaining work is in the Cacti plugin.

For 0.98, the standalone is fine for production. The new version is likely to break again before it's finished. If you have PHP 7.2, you should actually try the 0.98a test release I made for someone else, but didn't get enough feedback to make official: http://www.network-weathermap.com/files ... -test3.zip That is 0.98 with minimal modifications to work on PHP 7+
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!)

netniV
Cacti Guru User
Posts: 3056
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#9 Post by netniV » Sun Apr 29, 2018 5:32 am

PHP 7.2 is likely to bring you more heartache than fixes. There were a number of breaking changes in there which means the entire cacti code base is going to be checked for compatibility. We have already identified and fixed a few in the development branch (1.2) so they will likely raise their heads running under 1.1.x

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#10 Post by jhonnyx » Sun Apr 29, 2018 8:54 am

Howie wrote:Standalone won't work with Boost in any version. It needs access to the Cacti poller and database.
Oh, I am sorry for that, it would have been nice after all, this is a hard stop for me as my CACTI uses BOOST and by the diameter of my network I cannot do really otherwise.
So if I would try and work with what is now available (either Cacti 1.x plugin or WM 0.98 php7) I can:

1) Use WM 0.98 and export somehow the poller_output data in a CSV file, create a map with a cron job from that CSV file (makes sense?)

2) Use the WM CACTI 1.x plugin that integrates in the polling cycle cmd.php (does it? :) ) and populate the maps I create without the option 1 cron job, what I don't know is if the editor is at this stage integrated into CACTI 1.x or is to be used still a standalon (and this makes sense or is ... real?)
Howie wrote:I don't understand the middle bit about browsing to a map. You mean inside Cacti? With the github version? That doesn't work yet.
If you use the standalone version to create a map and HTML file, that should work fine.
No worries, that was me and headbanging with PHP7.2
Howie wrote:0.98 and the new version should both work standalone. The remaining work is in the Cacti plugin.

For 0.98, the standalone is fine for production. The new version is likely to break again before it's finished. If you have PHP 7.2, you should actually try the 0.98a test release I made for someone else, but didn't get enough feedback to make official: http://www.network-weathermap.com/files ... -test3.zip That is 0.98 with minimal modifications to work on PHP 7+
just to let you know, I tried WM standalone 0.98 for php7 and using php7.2 didn't work, with php 7.0 yes.


Final note (of a long post) : I like obviously the idea of WM and would like to use it somehow with CACTI 1.x to also help on finding bugs or simple use cases, just I am not sure it can work with my installation. If you can point to the right direction I'll work on bring something up and giving you some data.

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#11 Post by Howie » Sun Apr 29, 2018 9:06 am

THIS IS NOT A PRODUCTION SOLUTION! But, if you manually add the rows in weathermap_maps, the poller should generate correct maps. I'm not very interested in helping you do this though :-) I have limited time to work on weathermap, and I'd rather spend it on the new version. But here's what a valid row looks like. The filehash is just a random hex string of that length.

Code: Select all

mysql> select * from weathermap_maps where id=1;
+----+-----------+----------+--------+-------------+-----------+----------+------------+----------------------+-----------+-------+------------------+---------+--------+-------------+--------------+----------+-----------+
| id | sortorder | group_id | active | configfile  | imagefile | htmlfile | titlecache | filehash             | warncount | debug | runtime          | lastrun | config | thumb_width | thumb_height | schedule | archiving |
+----+-----------+----------+--------+-------------+-----------+----------+------------+----------------------+-----------+-------+------------------+---------+--------+-------------+--------------+----------+-----------+
|  1 |         1 |        1 | on     | simple.conf |           |          | Simple Map | c062a15641bfa990d124 |         0 | off   | 0.42891001701355 | NULL    |        |         250 |          164 | *        | off       |
+----+-----------+----------+--------+-------------+-----------+----------+------------+----------------------+-----------+-------+------------------+---------+--------+-------------+--------------+----------+-----------+
If you use the command-line (and remove the rrd_use_poller_output from your map config files), you will still get maps, but you'll get whatever data was last updated by Boost (maybe 30 minutes or more old), unless you have viewed those graphs recently (Boost flushes data to the rrd file when you view a graph).

For PHP 7.0 - the main issues were with the database functions, so for command-line use, you should be fine with 0.98. I wrote 0.98a for the magic combination of Cacti 0.8.8x+PHP7.x so that database access can work for those people.
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!)

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#12 Post by jhonnyx » Sun Apr 29, 2018 9:35 am

I agree with the fact that using for production some workaround is not the best and yes, for you is better to focus on the new version considering that even at the final stage will require lots of testing by users (as of now I believe there is rather a small group of users challenging themselves with it).

I wish you good luck, time and health especially to see that through.

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#13 Post by jhonnyx » Sun Apr 29, 2018 3:23 pm

In the end I tried the weathermap 0.98 for php7 and looks ok, just the editor buttons (any button) is not working.

With the 0.98 from 2016 is OK

jhonnyx
Cacti User
Posts: 85
Joined: Sun Feb 26, 2017 10:33 am

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#14 Post by jhonnyx » Mon Apr 30, 2018 8:34 am

I tried the following:

I configured PHP weathermap 0.98 (https://github.com/howardjones/network- ... p-0.98.zip)

I created a map reading the RRD files updated by CACTI, this worked well, generated by a cron job then I integrated the whole thing into a CACTI 1.x external link as certain information (like the graph over) requires the user to be logged in to CACTI to make them work (otherwise empty image).

So all this worked beautifully ... but (of course but)...

With BOOST running, as you predicted Howie, the RRD diles were not getting updated in time and after a while the attached graph was simply all 0s on the links, as soon as I opened a graph it started pulling in data from CACTI at the next refresh.
In the attached image it's visible that the uplinks down are updated because I opened that device in CACTI, while the uplinks on top are not updated because that device was not opened in CACTI.

Since it all worked so nice and well, can I ask if it's possible to integrate (code) in the standalone PHP WM to read data from CACTI poller_output_boost giving the parameters manually?

I still agree your time is best spent on the new CACTI plugin, of course but this could give us a working solution to finally use WM in CACTI 1.x.

Alternatively...querying in SNMP for the link TARGETs should be possible but seems so redundant, can you tell if it is a possibility and if you advise that?

Thanks again
Attachments
Untitled.jpg
Untitled.jpg (87.86 KiB) Viewed 3505 times

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

Re: Cacti 1.1.36 and Wheatermap dev (no plugin install)

#15 Post by Howie » Mon Apr 30, 2018 1:08 pm

Hehe. External Links used to be another plugin of mine :-)

I thought I remembered that someone had a tool for flushing certain rrd files when running Boost, but I can't think what it was, or where.

I would say without writing any new code, I'd suggest you look at the database stuff from yesterday. That will (should) generate maps for you with Boost support, and you can use your external links solution to display them.
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!)

Post Reply