Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Hi Adam,
OK, read that page and here's what happens when I try to switch from stable to rolling as per documentation:-
root@obs:/opt/observium# svn up Updating '.': At revision 10304. root@obs:/opt/observium# svn switch https://svn.observium.org/svn/observium/trunk svn: E155025: 'svn switch' does not support switching a working copy to a different repository svn: E155025: 'http://svn.observium.org/svn/observium/branches/stable' is not the same repository as 'https://svn.observium.org/svn'
Regards
Chris Macneill Zelan Ltd
From: "observium" observium@observium.org To: "observium" observium@observium.org Cc: "Adam Armstrong" adama@memetic.org Sent: Thursday, 27 February, 2020 15:22:50 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Read that entire page.
Sent from [ http://www.bluemail.me/r?b=15818 | BlueMail ] On 27 Feb 2020, at 02:06, Chris Macneill < [ mailto:cmacneill@zelan.co.nz | cmacneill@zelan.co.nz ] > wrote:
Hi Adam,
"svn update" is what I assumed I was supposed to use and it said successfully updated to 10304.
Webpage says v20.2.10302 (stable) after update.
I don't see any doucmentation in [ https://docs.observium.org/updating/#upgrading-the-subscription-edition-to-t... | https://docs.observium.org/updating/#upgrading-the-subscription-edition-to-t... ] that references any difference between latest "stable" and latest "rolling".
How do I upgrade to "rolling" 10304?
Why does "svn update" tell me it's updated to 10304 when it seemingly hasn't?
Regards
Chris Macneill Zelan Ltd
From: "observium" observium@observium.org To: "observium" observium@observium.org Cc: "Adam Armstrong" adama@memetic.org Sent: Thursday, 27 February, 2020 14:51:35 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Is this, perchance, stable, and not rolling?
Adam.
Sent from [ http://www.bluemail.me/r?b=15818 | BlueMail ] On 27 Feb 2020, at 01:45, Chris Macneill via observium < [ mailto:observium@observium.org | observium@observium.org ] > wrote: BQ_BEGIN
Hi Mike,
Sorry, 20.2.10304 doesn't fix it. Fields still split on commas for port_descr_type = 'cust' and debug results exactly the same as previous:-
SELECT * FROM `ports` AS I , `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = 'GDC Westland Recreation Centre' , ' 83 High St' , ' Greymouth' AND D . device_id = I . device_id
Also, a new bug added, software version number at bottom of screen is now out of step with "svn update". Update said successfully updated to 10304, but webpage says 20.2.10302
I've had a hack at the code in html/includes/graphs/customer/bits.inc.php and put the following workaround in place:-
Line 16 (Original v20.2.10304 Code) foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($vars['id'])) as $port)
Replaced with:-
// Copy id array directly for case where port_descr_descr was NOT previosuly split/exploded on commas. $pddstr = $vars['id']; if ( count($vars['id']) > 1 ) { // Impode id array addng commas where array size > 1, i.e. original id contained commas and WAS split/exploded. $pddstr = implode(",", $vars['id']); } foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($pddstr)) as $port)
$vars['id'] is the result of splitting or exploding port_descr_descr string value somewhere earlier, but I can't locate that in the code and as Adam mentioned, changing this elsewhere might have undesirable consequences.
The problem only happens for port_descr_type = "cust", for other port types, e.g. core, peering, transit, port_descr_descr isn't split or exploded despite containing commas, but I can't find the locaiton in the code where this conditional behaviour occurs.
Regards
Chris Macneill Zelan Ltd
From: "Mike Stupalov" mike@observium.org To: "observium" observium@observium.org, "observium" observium@observium.org Cc: "Chris Macneill" cmacneill@cmit.nz Sent: Thursday, 27 February, 2020 12:59:52 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Hi Chris,
try with latest revision (r10304, trunk).
Issue should be fixed.
Chris Macneill via observium wrote on 26.02.2020 20:25:
BQ_BEGIN
Hi Adam,
Looks like data is being split on commas and causing an SQL syntax error. Debug for:-
Cust: GDC Westland Recreation Centre, 83 High St, Greymouth [100Mbit] {Chorus CVID.113}
returns:-
Error in query: (You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' 83 High St',' Greymouth' AND D.device_id = I.device_id' at line 1) 1064
I can obviously fix this short-term by removing commas from the Port Descriptions, but would be good to be able to support use of commas and other punctuation in the longer term or at least update the Help page to list characters to avoid.
I had a quick look earlier at the Regex that was parsing the description data, but wasn't immediately obvious commas were an issue. At least I know where the problem lies and I'll take another look later. I guess semi-colons might work if commas don't.
Regards
Chris Macneill Zelan Ltd
From: "observium" [ mailto:observium@observium.org | observium@observium.org ] To: "observium" [ mailto:observium@observium.org | observium@observium.org ] Cc: "adama" [ mailto:adama@observium.org | adama@observium.org ] Sent: Thursday, 27 February, 2020 04:50:22 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Do you get anything useful from showing rrd command on the graph browser page? (click on the graph)
Do you get anything useful from adding &debug=1 on the end of the graph image url?
Can you arrange ssh/http access to the install if those two things don’t show us what the problem is?
Adam.
From: observium [ mailto:observium-bounces@observium.org | observium-bounces@observium.org ] On Behalf Of Chris Macneill via observium Sent: 26 February 2020 05:22 To: observium [ mailto:observium@observium.org | observium@observium.org ] Cc: Chris Macneill [ mailto:cmacneill@cmit.nz | cmacneill@cmit.nz ] Subject: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Hi,
We're currently using Observium v20.1.10233 and have a problem with "Error Drawing Graph" for all ports with a "Cust" prefix. Ports with "Core", "Peer" or "Transit" prefix correctly show graphs.
The ports we're monitoring are VLANs, the Peer/Transit are simple 802.1q VLANs, the Core/Customer VLANs are QinQ, i.e. two layers of 802.1q headers.
All port types are correctly detected by SNMP and listed against the Router. Given that "Core" displays graphs correctly, this doesn't seem to be related to QinQ, but specifically to the "Cust" prefix.
Examples that correctly show graphs, 1st is 802.1q, 2nd is QinQ:-
Peering: Datacom CHC<->Chorus [10Gbit] {Chorus SVID.100}
Core: Zelan Workshop, 50 Palmerston St, Westport [1Gbit] {Chorus CVID.100}
Example (QinQ) that gives "Error Drawing Graph":-
Cust: GDC Westland Recreation Centre, 83 High St, Greymouth [100Mbit] {Chorus CVID.113}
All our routers are MikroTik, so can't determine if this is a router OS/hardware specific issue.
Regards
Chris Macneill Zelan Ltd.
_______________________________________________ observium mailing list [ mailto:observium@observium.org | observium@observium.org ] [ http://postman.memetic.org/cgi-bin/mailman/listinfo/observium | http://postman.memetic.org/cgi-bin/mailman/listinfo/observium ]
_______________________________________________ observium mailing list [ mailto:observium@observium.org | observium@observium.org ] [ http://postman.memetic.org/cgi-bin/mailman/listinfo/observium | http://postman.memetic.org/cgi-bin/mailman/listinfo/observium ]
I'd not recommend switching from stable to rolling to get a minor bug fix a bit early.
SVN expects the repository path to match, so it wants http/https to be the same between the two locations.
Adam.
Sent from BlueMail
On 27 Feb 2020, 03:01, at 03:01, Chris Macneill via observium observium@observium.org wrote:
Hi Adam,
OK, read that page and here's what happens when I try to switch from stable to rolling as per documentation:-
root@obs:/opt/observium# svn up Updating '.': At revision 10304. root@obs:/opt/observium# svn switch https://svn.observium.org/svn/observium/trunk svn: E155025: 'svn switch' does not support switching a working copy to a different repository svn: E155025: 'http://svn.observium.org/svn/observium/branches/stable' is not the same repository as 'https://svn.observium.org/svn'
Regards
Chris Macneill Zelan Ltd
From: "observium" observium@observium.org To: "observium" observium@observium.org Cc: "Adam Armstrong" adama@memetic.org Sent: Thursday, 27 February, 2020 15:22:50 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Read that entire page.
Sent from [ http://www.bluemail.me/r?b=15818 | BlueMail ] On 27 Feb 2020, at 02:06, Chris Macneill < [ mailto:cmacneill@zelan.co.nz | cmacneill@zelan.co.nz ] > wrote:
Hi Adam,
"svn update" is what I assumed I was supposed to use and it said successfully updated to 10304.
Webpage says v20.2.10302 (stable) after update.
I don't see any doucmentation in [ https://docs.observium.org/updating/#upgrading-the-subscription-edition-to-t... | https://docs.observium.org/updating/#upgrading-the-subscription-edition-to-t... ] that references any difference between latest "stable" and latest "rolling".
How do I upgrade to "rolling" 10304?
Why does "svn update" tell me it's updated to 10304 when it seemingly hasn't?
Regards
Chris Macneill Zelan Ltd
From: "observium" observium@observium.org To: "observium" observium@observium.org Cc: "Adam Armstrong" adama@memetic.org Sent: Thursday, 27 February, 2020 14:51:35 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Is this, perchance, stable, and not rolling?
Adam.
Sent from [ http://www.bluemail.me/r?b=15818 | BlueMail ] On 27 Feb 2020, at 01:45, Chris Macneill via observium < [ mailto:observium@observium.org | observium@observium.org ] > wrote: BQ_BEGIN
Hi Mike,
Sorry, 20.2.10304 doesn't fix it. Fields still split on commas for port_descr_type = 'cust' and debug results exactly the same as previous:-
SELECT * FROM `ports` AS I , `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = 'GDC Westland Recreation Centre' , ' 83 High St' , ' Greymouth' AND D . device_id = I . device_id
Also, a new bug added, software version number at bottom of screen is now out of step with "svn update". Update said successfully updated to 10304, but webpage says 20.2.10302
I've had a hack at the code in html/includes/graphs/customer/bits.inc.php and put the following workaround in place:-
Line 16 (Original v20.2.10304 Code) foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($vars['id'])) as $port)
Replaced with:-
// Copy id array directly for case where port_descr_descr was NOT previosuly split/exploded on commas. $pddstr = $vars['id']; if ( count($vars['id']) > 1 ) { // Impode id array addng commas where array size > 1, i.e. original id contained commas and WAS split/exploded. $pddstr = implode(",", $vars['id']); } foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($pddstr)) as $port)
$vars['id'] is the result of splitting or exploding port_descr_descr string value somewhere earlier, but I can't locate that in the code and as Adam mentioned, changing this elsewhere might have undesirable consequences.
The problem only happens for port_descr_type = "cust", for other port types, e.g. core, peering, transit, port_descr_descr isn't split or exploded despite containing commas, but I can't find the locaiton in the code where this conditional behaviour occurs.
Regards
Chris Macneill Zelan Ltd
From: "Mike Stupalov" mike@observium.org To: "observium" observium@observium.org, "observium" observium@observium.org Cc: "Chris Macneill" cmacneill@cmit.nz Sent: Thursday, 27 February, 2020 12:59:52 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Hi Chris,
try with latest revision (r10304, trunk).
Issue should be fixed.
Chris Macneill via observium wrote on 26.02.2020 20:25:
BQ_BEGIN
Hi Adam,
Looks like data is being split on commas and causing an SQL syntax error. Debug for:-
Cust: GDC Westland Recreation Centre, 83 High St, Greymouth [100Mbit] {Chorus CVID.113}
returns:-
Error in query: (You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' 83 High St',' Greymouth' AND D.device_id = I.device_id' at line 1) 1064
I can obviously fix this short-term by removing commas from the Port Descriptions, but would be good to be able to support use of commas and other punctuation in the longer term or at least update the Help page to list characters to avoid.
I had a quick look earlier at the Regex that was parsing the description data, but wasn't immediately obvious commas were an issue. At least I know where the problem lies and I'll take another look later. I guess semi-colons might work if commas don't.
Regards
Chris Macneill Zelan Ltd
From: "observium" [ mailto:observium@observium.org | observium@observium.org ] To: "observium" [ mailto:observium@observium.org | observium@observium.org ] Cc: "adama" [ mailto:adama@observium.org | adama@observium.org ] Sent: Thursday, 27 February, 2020 04:50:22 Subject: Re: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Do you get anything useful from showing rrd command on the graph browser page? (click on the graph)
Do you get anything useful from adding &debug=1 on the end of the graph image url?
Can you arrange ssh/http access to the install if those two things don’t show us what the problem is?
Adam.
From: observium [ mailto:observium-bounces@observium.org | observium-bounces@observium.org ] On Behalf Of Chris Macneill via observium Sent: 26 February 2020 05:22 To: observium [ mailto:observium@observium.org | observium@observium.org ] Cc: Chris Macneill [ mailto:cmacneill@cmit.nz | cmacneill@cmit.nz ] Subject: [Observium] Port Description Parsing - Cust Graphs "Error Drawing Graph"
Hi,
We're currently using Observium v20.1.10233 and have a problem with "Error Drawing Graph" for all ports with a "Cust" prefix. Ports with "Core", "Peer" or "Transit" prefix correctly show graphs.
The ports we're monitoring are VLANs, the Peer/Transit are simple 802.1q VLANs, the Core/Customer VLANs are QinQ, i.e. two layers of 802.1q headers.
All port types are correctly detected by SNMP and listed against the Router. Given that "Core" displays graphs correctly, this doesn't seem to be related to QinQ, but specifically to the "Cust" prefix.
Examples that correctly show graphs, 1st is 802.1q, 2nd is QinQ:-
Peering: Datacom CHC<->Chorus [10Gbit] {Chorus SVID.100}
Core: Zelan Workshop, 50 Palmerston St, Westport [1Gbit] {Chorus CVID.100}
Example (QinQ) that gives "Error Drawing Graph":-
Cust: GDC Westland Recreation Centre, 83 High St, Greymouth [100Mbit] {Chorus CVID.113}
All our routers are MikroTik, so can't determine if this is a router OS/hardware specific issue.
Regards
Chris Macneill Zelan Ltd.
observium mailing list [ mailto:observium@observium.org | observium@observium.org ] [ http://postman.memetic.org/cgi-bin/mailman/listinfo/observium | http://postman.memetic.org/cgi-bin/mailman/listinfo/observium ]
observium mailing list [ mailto:observium@observium.org | observium@observium.org ] [ http://postman.memetic.org/cgi-bin/mailman/listinfo/observium | http://postman.memetic.org/cgi-bin/mailman/listinfo/observium ]
-- Mike Stupalov Observium Limited, [ http://observium.org/ | http://observium.org ]
observium mailing list observium@observium.org [ http://postman.memetic.org/cgi-bin/mailman/listinfo/observium | http://postman.memetic.org/cgi-bin/mailman/listinfo/observium ]
BQ_END
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
BQ_END
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (2)
-
Adam Armstrong
-
Chris Macneill