network-weathermap
network-weathermap copied to clipboard
Pick a data source last used no longer available (and/or Boost support)
Based on database-refactor branch web editor.
When you want to pick a DS for a link that option is no longer there.
This is work in progress. The picker was just changed quite a lot. Sorry, I was trying not to commit the changes until that work was complete.
No rush! just letting you know in case you missed it.
I think you will succeed. I am waiting too
@jpobeda Did you manage to make it work on Cacti 1.x.x ?
@jhonnyx82 I got the version for 0.8.8 running under 1.1.37 if that is what you're asking.
Interesting, does it work with BOOST for 1.1.x CACTI? did you have to modify anything?
considering the timeline of the development of WM for CACTI 1.x I am considering option to use in production previous release of WM but need to know how to fork it in CACTI 1.x if possible (with BOOST)
I can't exactly recall how/when/where it came from at this point. Someone around @pautiina or cigamit pushed a PR sometime ago plus a few tweaks here and there.
I can send you the version I'm running if you want but I don't use Boost so I can't guarantee that it'll work with boost.
It's only got a couple of gui issues that I get around with an F5.
I'm sticking to this version until Howie releases a proper 1.x version.
Thanks but unfortunately it will not work, I had something working but requires BOOST support for me that is somewhere broken in the most recent release of WM (didn't realize that until a recent test, before it worked)
I am not bothering with opening issues as I am afraid WM is not currently in development, I will wait when it will be and actively report
Boost not working
@jhonnyx82 WM is in development, it's just not as quick a turn around as you may have come to be used to from other sources. A lot of what @howardjones does is offline development so you don't see the changes until he is happy with the latest batch of updates.
Unfortunately, as with all us open source developers, jobs, life and family get in the way. I've got a week off and i've been told under no circumstances am I supposed to be near a keyboard until the week is over by the misses ;-)
For display purposes, I believe that WM is pretty much there. The things left to solve are more around the editor/updating via GUI. If you are happy to manually edit your files that should work just fine. I'm not actually running it yet as I keep resetting my test system so my impression could be wrong.
That being said, I'm not even sure if the dev version of Weathermaps supports Boost or not.
Feel free to contribute, rather than complain that the free work hasn't been done yet, also ;-)
As far as I know, the editor and the core map stuff (e.g. the command-line tool, and the poller) are working fine. It's the UI that's not done. That's using some new techniques (for me), so as well as what @netniV mentioned (having a life, other responsibilities, etc - for me it's home improvements), the work is relatively slow moving when I do get a chance. Last weekend I did spend 2 days getting Travis CI working, for example, so that testing across 4 PHP versions is automated, for both my and other's code contributions. I also have no intention of moving to Cacti 1.x personally, so my motivation is a bit different to yours.
I'm sorry, but why you don't want upgade to Cacti 1.X ?
Probably due to the if it ain't broke don't fix it
maxim. Plus there is a small amount of work migrating, and not everything works the same way it used to. So, long term users are loath to move from the devil they know. Totally understandable but also the reason why some companies still have Windows XP on their networks 😱
Anyway, I'm not entirely sure that we are following the original meaning of this issue. We seem to have delved off into the realms of does the whole of WM, should I make it work, rather than the specific issue of the editor.
Firstly, I don't like the new user interface with partial reloads of HTML lumps, either as a user, or as a plugin developer. Secondly, I no longer work in a frontline network operations position, and the org I work for uses other tools for the same job, so we'll be moving there instead. The remaining Cacti stuff is facility monitoring where we put in a lot of time to get various modbus, CANbus etc stuff into Cacti and that falls into the "if it ain't broke" category :-)
Anyway - back to Boost. I can't think of a reason why it wouldn't work, unless Boost has also changed dramatically in the recent versions. rrd_use_poller_output
is still there in the dev version, and should work - it looks at data passing through the poller_output
plugin hook, which as far as I know is working OK. I'll check into that. Do you see rows appearing in the weathermap_data
table?
Hi Howie! Modbus? Moving on to Facilities monitoring I see :). Be well! I'm still here :+1:. Thanks for all you do.
Haha - that was another previous life. I spent a lot of time in the DCs hooking up all our plant, and no-one wants to mess with it :-) Lots of old-skool volt-free contacts, modbus, canbus and 1-wire. Take it easy, Mr W...
@netniV and @howardjones No need to explain what is to have a life, in the little free time I happen to try to have one too :)
My statement was fair I believe, use and test the software when released.
Anyway I think that people requesting a software or a feature should be considered positively for a developer (obviously I disagree with the tedious ones), it means out there someone values your work
(Took me a while to find the issue with the Boost problem in it - obviously the subject is "Pick a data source last used no longer available" :laughing: )
@jhonnyx82 :
I've just tested with Cacti 1.1.28 and the current master
branch for weathermap, and Boost support (with SET rrd_use_poller_output 1
in the map file) appears to be working for me. The appropriate DS IDs are created in the weathermap_data
table, they are populated during a poller run, and the values are used when drawing the map. Nothing has changed with this code for a while now, so I think this is an error on your side, unless you have more info than "somewhat broken". Most common issue, if Boost is working for you otherwise is that the rrd filenames must be complete paths, with the first part matching the Cacti-internal rra_path
value exactly. If you turn on debug logging, weathermap will log the expected path prefix. Potentially symlinks might trip it up - I think some debian/ubuntu packages move things around.
Hi @howardjones
I got some time to test this again, I can confirm that data is gathered from BOOST, I remember a manual weathermap_maps row insertion required to gather data for BOOST (from a discussion on forums.cacti.net), now I can see data coming in and maps are generated in /output/ folder but there are some problems here unfortunately:
the html produced reference the background image by a call on the plugin, but it doesn't work, here the HTML for this
<img id="wmapimage" src="weathermap-cacti10-plugin.php?action=viewimage&id=c062a15641bfa990d124&time=1536409023" width="800" height="600" border="0" usemap="#weathermap_c062a15641bfa990d124_imap" />
editing the html and inserting the image generated (c062a15641bfa990d124.png) shows correctly the page
The files generated follows the "hash" file inserted and not the cell value of weathermap_maps imagefile and htmlfile
This would not be a big problem as I noticed that calling the weathermap-new script gives full control on the output of those files but it automatically disable the required rrd_use_poller_output option in the map :(
EDIT: I simply renamed the "hash" as the output file I would prefer...it worked :)
So to say, if it could be possible to use a flag to allow the weathermap-new script to use rrd_use_poller_output I may batch this and set the files to a proper folder without keeping track of all these hash files (at least I mean while development is ongoing)
Note for myself :) : In case of no joy just do the following
- generate with "weathermap-new" an html files at each map modification and copy in the "publish" folder for the maps
- create a script to copy and rename from /output/ folder each map to a image referenced in the html file generated in the first step
- use WM cacti plugin editor
Oh, I'm not disagreeing that it's not working enough to be usable, just that Boost support was broken :-)
1 - sounds like a simple issue. I'll check that now. That src= looks correct - that action should return the image. It should not be a link directly to the image.
2 - it has used the hash value since version 0.8 or something (i.e. many years), when using the cacti plugin. The new feature is actually that it should also make a second copy in the place you request with IMAGEFILE and HTMLFILE, which it previously ignored when running from the Cacti poller. Again, it was working, so I will check that now.
poller_output support is not (and never has been) available from the command-line tool because it doesn't know anything about the Cacti environment (which it needs to access the database). I guess an option to point it at the Cacti config.php
file could be added though.
I guess an option to point it at the Cacti config.php file could be added though.
Somehow I think it could make your (and our) life easier :) because as you stated the way for WM is to be an independent tool out of CACTI, and I can see the benefits of it, but having to fork it to an NMS (cacti or LibreNMS or anything else) has lots of coding in the background while you could just expose an interface to WM or vice versa allow NMS developer to fork interfaces to your program and everyone would be happy :)
Anyway, great job, I am sorry it's not complete to show it around but I will try to use it as I can
For me, part 2 of this (using HTMLOUTPUTFILE
and IMAGEOUTPUTFILE
) produces the files in cacti/plugins/weathermap
(if you don't specify a full path). The img src was missing though. That's now fixed in the next commit. You can also use IMAGEURI to override the img src in that second copy (or the normal output for the command-line tool), as before, and that works too.
Thank you,
so to recap I am going to add (with the next commit) the following options in the maps:
- HTMLOUTPUTFILE and IMAGEOUTPUTFILE : to specify the relative absolute path of the output WM files to generate (even produced by CACTI plugin?)
- IMAGEURI : to specify a relative or absolute path for the html file
tag
Did I get it right? Also this means the behavior of HTMLOUTPUTFILE and IMAGEOUTPUTFILE is changed from 0.97 (by your manual entry below it states that these options are ignored with CACTI) https://network-weathermap.com/manual/0.97b/pages/config-reference.html#IMAGEURI
It was added in 0.98, but yes:
ADDED - IMAGEOUTPUTFILE and HTMLOUTPUTFILE are honoured in Cacti poller as a location for a second copy of those files.
Thank you,
I will always review ver 0.98 manual, apologies, will test your last commit as soon as I can.