Send Netdot-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."


Today's Topics:

   1. Re: Problem exporting to Nagios (Carlos Vicente)
   2. Re: Problem exporting to Nagios (Anton Berezin)


----------------------------------------------------------------------

Message: 1
Date: Tue, 7 Oct 2014 14:02:20 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] Problem exporting to Nagios
To: Cosme Corr?a <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1

Hi Cosme,

Seems like a bug due to Pg not understanding that particular JOIN syntax. 
Please open a ticket in Redmine.

All Pg experts out there with a good clue how to fix, let me know.

cv

On Oct 6, 2014, at 11:37 AM, Cosme Corr?a <[email protected]> wrote:

> Hi,
> 
> I am testing Export -> Configurations -> Nagios
> 
> With this error message:
> 
> config_tasks.html produced the following error:
> 
> 
> DBD::Pg::db selectall_arrayref failed: ERROR:  syntax error at or near ","
> LINE 11:           LEFT OUTER JOIN (bgppeering, entity peer) ON d.id=...
>                                               ^ [for Statement "
> 
>           SELECT    d.id, d.snmp_managed, d.community, d.snmp_target, 
> d.host_device,
>                     d.monitoring_template, d.down_from, d.down_until, 
> entity.name, entity.aliases,
>                     site.name, site.number, site.aliases, contactlist.id,
>                     i.id, i.number, i.name, i.description, 
> i.admin_status, i.monitored, i.contactlist,
>                     ip.id, ip.address, ip.version, ip.parent, 
> ip.monitored, rr.name, zone.name,
>                     service.id, service.name, ipservice.monitored, 
> ipservice.contactlist,
>                     bgppeering.bgppeeraddr, bgppeering.contactlist, 
> peer.asnumber, peer.asname
>           FROM      rr, zone, device d
>           LEFT OUTER JOIN (bgppeering, entity peer) ON 
> d.id=bgppeering.device
>                            AND bgppeering.entity=peer.id
>                            AND bgppeering.monitored=1
>           LEFT OUTER JOIN devicecontacts ON d.id=devicecontacts.device
>           LEFT OUTER JOIN contactlist ON 
> contactlist.id=devicecontacts.contactlist
>           LEFT OUTER JOIN entity ON d.used_by=entity.id
>           LEFT OUTER JOIN site ON d.site=site.id,
>                     interface i
>           LEFT OUTER JOIN ipblock ip ON ip.interface=i.id
>           LEFT OUTER JOIN ipservice ON ipservice.ip=ip.id
>           LEFT OUTER JOIN service ON ipservice.service=service.id
>           WHERE     d.monitored='1'
>                AND  i.device=d.id
>                AND  d.name=rr.id
>                AND  rr.zone=zone.id
>          "] at /usr/local/netdot/lib/Netdot/Exporter.pm line 85.
> 
> Stack:
>   [/usr/local/netdot/lib/Netdot/Exporter.pm:85]
>   [/usr/local/netdot/lib/Netdot/Exporter/Nagios.pm:167]
>   [/usr/local/netdot/htdocs/export/config_tasks.html:144]
>   [/usr/local/netdot/htdocs/export/autohandler:64]
>   [/usr/share/perl5/HTML/Mason/Request.pm:936]
> [/usr/local/netdot/htdocs/masondata/obj/991023240/export/autohandler.obj:21]
>   [/usr/local/netdot/htdocs/autohandler:76]
> 
> 
> Does it make any sense?
> 
> TIA,
> 
> -- 
> Cosme Faria Corr?a
> 
> _______________________________________________
> Netdot-users mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-users




------------------------------

Message: 2
Date: Tue, 7 Oct 2014 20:33:11 +0200
From: Anton Berezin <[email protected]>
Subject: Re: [Netdot-users] Problem exporting to Nagios
To: Carlos Vicente <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

On Tue, Oct 07, 2014 at 02:02:20PM -0400, Carlos Vicente wrote:
> Hi Cosme,
> 
> Seems like a bug due to Pg not understanding that particular JOIN syntax. 
> Please open a ticket in Redmine.
> 
> All Pg experts out there with a good clue how to fix, let me know.

Carlos, Cosme,

This has been fixed in my tree for a while - however, the corresponding
commit cannot be immediately pulled in without getting DB structure changed
substantially.

https://github.com/tobez/Netdot/commit/82458a84d9ea39d47fba2cc1972e1354a96b3e7d

However, if you apply the second and third "sections" of the
lib/Netdot/Exporter.pm diff, all should be good.

\Anton.

> 
> cv
> 
> On Oct 6, 2014, at 11:37 AM, Cosme Corr?<[email protected]> wrote:
> 
> > Hi,
> > 
> > I am testing Export -> Configurations -> Nagios
> > 
> > With this error message:
> > 
> > config_tasks.html produced the following error:
> > 
> > 
> > DBD::Pg::db selectall_arrayref failed: ERROR:  syntax error at or near ","
> > LINE 11:           LEFT OUTER JOIN (bgppeering, entity peer) ON d.id=...
> >                                               ^ [for Statement "
> > 
> >           SELECT    d.id, d.snmp_managed, d.community, d.snmp_target, 
> > d.host_device,
> >                     d.monitoring_template, d.down_from, d.down_until, 
> > entity.name, entity.aliases,
> >                     site.name, site.number, site.aliases, contactlist.id,
> >                     i.id, i.number, i.name, i.description, 
> > i.admin_status, i.monitored, i.contactlist,
> >                     ip.id, ip.address, ip.version, ip.parent, 
> > ip.monitored, rr.name, zone.name,
> >                     service.id, service.name, ipservice.monitored, 
> > ipservice.contactlist,
> >                     bgppeering.bgppeeraddr, bgppeering.contactlist, 
> > peer.asnumber, peer.asname
> >           FROM      rr, zone, device d
> >           LEFT OUTER JOIN (bgppeering, entity peer) ON 
> > d.id=bgppeering.device
> >                            AND bgppeering.entity=peer.id
> >                            AND bgppeering.monitored=1
> >           LEFT OUTER JOIN devicecontacts ON d.id=devicecontacts.device
> >           LEFT OUTER JOIN contactlist ON 
> > contactlist.id=devicecontacts.contactlist
> >           LEFT OUTER JOIN entity ON d.used_by=entity.id
> >           LEFT OUTER JOIN site ON d.site=site.id,
> >                     interface i
> >           LEFT OUTER JOIN ipblock ip ON ip.interface=i.id
> >           LEFT OUTER JOIN ipservice ON ipservice.ip=ip.id
> >           LEFT OUTER JOIN service ON ipservice.service=service.id
> >           WHERE     d.monitored='1'
> >                AND  i.device=d.id
> >                AND  d.name=rr.id
> >                AND  rr.zone=zone.id
> >          "] at /usr/local/netdot/lib/Netdot/Exporter.pm line 85.
> > 
> > Stack:
> >   [/usr/local/netdot/lib/Netdot/Exporter.pm:85]
> >   [/usr/local/netdot/lib/Netdot/Exporter/Nagios.pm:167]
> >   [/usr/local/netdot/htdocs/export/config_tasks.html:144]
> >   [/usr/local/netdot/htdocs/export/autohandler:64]
> >   [/usr/share/perl5/HTML/Mason/Request.pm:936]
> > [/usr/local/netdot/htdocs/masondata/obj/991023240/export/autohandler.obj:21]
> >   [/usr/local/netdot/htdocs/autohandler:76]
> > 
> > 
> > Does it make any sense?
> > 
> > TIA,
> > 
> > -- 
> > Cosme Faria Corr?> > 
> > _______________________________________________
> > Netdot-users mailing list
> > [email protected]
> > https://osl.uoregon.edu/mailman/listinfo/netdot-users
> 
> 
> _______________________________________________
> Netdot-users mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-users

-- 
Our society can survive even a large amount of irrational regulation.
  -- John McCarthy


------------------------------

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 71, Issue 2
*******************************************

Reply via email to