[SOLVED]Unrecognised config with more than one config file

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

jeancog84
Posts: 4
Joined: Fri Jan 19, 2018 3:04 pm

[SOLVED]Unrecognised config with more than one config file

Post by jeancog84 »

Hi Guys,
we're facing a problem, when we have more than one file added to weathermaps list, just the first map works. The others when try to build the map return these errors below. All config lines were considered Unrecognised.

We really don't know whats happening because there's no other error logs.

Thanks.

01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 3: FONTDEFINE 100 docs/example/Vera.ttf 10
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 5: BACKGROUND images/background1_950x625_197.jpg
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 6: WIDTH 1024
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 7: HEIGHT 768
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 8: HTMLSTYLE overlib
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 9: KEYFONT 100
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 10: TITLE Simple Map
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 11: TIMEPOS 746 17 Created: %b %d %Y %H:%M:%S
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 14: KEYTEXTCOLOR 0 0 0
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 15: KEYOUTLINECOLOR 0 0 0
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 16: KEYBGCOLOR 255 255 255
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 17: BGCOLOR 255 255 255
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 18: TITLECOLOR 0 0 0
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 19: TIMECOLOR 0 0 0
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 31: SET nowarn_clipping 1
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 38: LABELFONT 100
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 39: MAXVALUE 100
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 44: WIDTH 5
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 45: BWFONT 100
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 46: COMMENTFONT 100
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 48: BANDWIDTH 1M
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 53: LABEL Node 1
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 54: POSITION 649 242
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 57: LABEL Node 2
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 58: POSITION 258 265
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 61: LABEL Node 3
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 62: POSITION 502 69
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 67: TARGET static:10M:20M
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 68: NODES node1 node2
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 71: NODES node2 node3
01/19/2018 06:00:19 PM - WEATHERMAP: Poller[0] WARNING: [Map 7] simple.conf: Unrecognised config on line 72: BANDWIDTH 2M
Last edited by jeancog84 on Mon Jan 22, 2018 8:46 am, edited 1 time in total.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Unrecognised config with more than one config file

Post by netniV »

What version of cacti/weather maps do you have?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
jeancog84
Posts: 4
Joined: Fri Jan 19, 2018 3:04 pm

Re: Unrecognised config with more than one config file

Post by jeancog84 »

Hi,

Cacti: Version 0.8.8h
Weathermap: 0.98
PHP: PHP 7.0.22-0ubuntu0.16.04.1

Thanks for your help.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Unrecognised config with more than one config file

Post by Howie »

I think it's probably PHP 7 that is the issue here.

If you run from command line instead, I bet it works (the PHP 7 issue is with database access, so it only affects the cacti plugin).

Code: Select all

php weathermap --config configs/simple.conf --output simple.png
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!)
jeancog84
Posts: 4
Joined: Fri Jan 19, 2018 3:04 pm

Re: Unrecognised config with more than one config file

Post by jeancog84 »

Hi Howie, thanks for your reply.
You're right, when I run manually, it's worked for our 3 conf files.

About the PHP-7 issue, is there any workaround that I can do here?

Thanks,

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

Re: Unrecognised config with more than one config file

Post by Howie »

Ubuntu 16.04 does let you use php 5.6, which should work fine, if your other applications are OK with that.

The big 1.0.0 weathermap release will resolve this, but that's some time away still.
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Unrecognised config with more than one config file

Post by Howie »

I started to look into a quicker 0.98a release to resolve this issue for 0.8.8 on PHP 7, but for me, Cacti itself doesn't work on PHP 7.1! What did you do to get around that?

I've set the database type to 'mysqli' instead of 'mysql'. But I still get:

Code: Select all

[Sun Jan 21 12:30:32.411860 2018] [php7:notice] [pid 15391] [client 10.0.2.2:35938] PHP Parse error:  syntax error, unexpected 'new' (T_NEW) in /var/www/html/cacti/lib/adodb/adodb.inc.php on line 866
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: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Unrecognised config with more than one config file

Post by netniV »

As far as I know php7 does'nt have ADODB, only PDO?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Unrecognised config with more than one config file

Post by netniV »

Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Unrecognised config with more than one config file

Post by Howie »

Right. Actually the fix is simple enough (it can be done with search/replace on one file), but I don't understand how people keep popping up using Cacti 0.8.8 with PHP 7, and only weathermap is an issue! :-) I assume something like the ubuntu package for Cacti has this pre-fixed, or something.

I'm just testing it now, but I think I will have a 0.98a for just this single issue very soon (today/tomorrow).

(it's the mysql_ functions that aren't in 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: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Unrecognised config with more than one config file

Post by netniV »

Paul will be able to answer that one better than me. But from what I understand, the default ubuntu package installs 0.8.8 which will be php 5, the backport installs 1.x so I'm slightly confused too :)
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Unrecognised config with more than one config file

Post by Howie »

For the purposes of documentation, the ADODB fix that seems to have worked for me is just: replace '=& new' with '= new' everywhere in cacti/lib/adodb/adodb.inc.php (about a dozen spots in total)
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Unrecognised config with more than one config file

Post by Howie »

So I spent a few hours making the minimum changes to get this to work... here's my test version. I've tried it on Ubuntu 16.04 with Cacti 0.8.8h (from source, not packages), and it seems to work OK for me, including things like poller_output support.

http://network-weathermap.com/files/php ... -test1.zip

If you can can confirm it also works for you, I'll push out a proper release for it.
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!)
jeancog84
Posts: 4
Joined: Fri Jan 19, 2018 3:04 pm

[SOLVED]Re: Unrecognised config with more than one config fi

Post by jeancog84 »

Hi Guys, thanks for help.
Howie, with your changes everything worked. Thank so much.
For now, i'm trying to install PHP5 instead PHP7, I think we have few issues in the future.

Best Regards,

Jean
Ros
Posts: 1
Joined: Thu Mar 01, 2018 3:34 am

Re: [SOLVED]Unrecognised config with more than one config fi

Post by Ros »

Hello,
I have the same problem, I tried to install your patched release but the editor not work.

Thank, Rosario.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests