Javier,

It was not this SQL, it is the db_update() later try to update the
tables when the poll finished.  

14:44:34 mqiu:
            SELECT hosts.id, count(interfaces.id) as cant_interfaces
            FROM hosts, interfaces
            WHERE hosts.id > 1 and hosts.poll = 1 and interfaces.id > 1
and
                interfaces.poll > 1 and interfaces.host = hosts.id and
((hosts.last_poll_date + hosts.poll_interval - (hosts.last_poll_time/2))
< 1107287074)
         GROUP BY hosts.id
Executing: /usr/bin/php -q poller2.php 5,4 0 0 0 &
14:44:35  :  H 5,4 : Poller Start : 93 Items.
14:44:35  :  H   4 :  I  13 :  P   1 : reachability_start:ping():
41ffdc2332f8b 
...

14:44:56 db_ping(pg) Connection to DB Restored...
Query failed - db_update(hosts) - Update hosts set last_poll_date =
'1107287091',last_poll_time = '17' where hosts.id = '5,4' - ERROR:
invalid input syntax for integer: "5,4"

Are you mean hosts.id in (5,4) ?

Min


-----Original Message-----
From: Javier Szyszlican [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 1:01 PM
Cc: [email protected]
Subject: Re: [jffnms-users] Flat rrd

No,

You were right the first time, the SQL is failing.

I'm going to try again with PgSQL on my side.

Thanks,
Javier

Min Qiu wrote:
> I failed to copy the entire SQL statement and give you the wrong 
> impression.  However, I recalled lasttime we had the similar problem 
> with inserting time() directly to pgsql.
> I comment it out in poller2.php and the rrdtool runs again:
> 
>     function hosts_random_list($interval = false) { //FIXME Add 
> Satellite
> 
>         $query_hosts="
>             SELECT hosts.id, count(interfaces.id) as cant_interfaces
>             FROM hosts, interfaces
>             WHERE hosts.id > 1 and hosts.poll = 1 and interfaces.id > 
> 1 and
>                 interfaces.poll > 1 and interfaces.host = hosts.id".
> ====>//              (($interval)?" and ((hosts.last_poll_date +
> hosts.poll_interval
> - (hosts.last_poll_time/2)) < ".time().")":"").
>             "\n\t GROUP BY hosts.id";
> 
> Min
> 
> 
> 
> -----Original Message-----
> From: Javier Szyszlican [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 01, 2005 7:07 AM
> Cc: [email protected]
> Subject: Re: [jffnms-users] Flat rrd
> 
> You did it ok,
> 
> But that SQL is not correct in PgSQL.
> 
> Let me fix it and send you a patch.
> 
> Javier
> 
> Min Qiu wrote:
> 
>>Tried to similate the sql in poller2.php
>>
>>select hosts.id, count(interfaces.id) as cant_interfaces
>>  from hosts, interfaces
>>  where hosts.id > 1 and hosts.poll=1 and
>>        interfaces.id >1 and interfaces.poll >1 and interfaces.host= 
>>hosts.id
>>
>>ERROR:  column "hosts.id" must appear in the GROUP BY clause or be 
>>used in an aggregate function
>>
>>What I did wrong in above SQL? 
>>
>>Min
>>
>>-----Original Message-----
>>From: Min Qiu
>>Sent: Monday, January 31, 2005 6:00 PM
>>To: [email protected]
>>Subject: [jffnms-users] Flat rrd
>>
>>I got flat rrd graphs since -pre3.  My backend db is pgsql (don't know
> 
> 
>>if any rrd configuration info be querried correctly).
>>The rrd data files did not updated since change to -pre3.  ps -ef 
>>indicated two rrdtool processes is running.  Where should I dig more 
>>cludes?
>>
>>Thanks,
>>
>>Min
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>Reporting Tool for open source databases. Create drag-&-drop reports.
>>Save time by over 75%! Publish reports on the web. Export to DOC, XLS,
> 
> RTF, etc.
> 
>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>_______________________________________________
>>jffnms-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
>>Reporting Tool for open source databases. Create drag-&-drop reports.
>>Save time by over 75%! Publish reports on the web. Export to DOC, XLS,
> 
> RTF, etc.
> 
>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>>_______________________________________________
>>jffnms-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
> 
> 
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Javier Szyszlican, Project Leader, JFFNMS [EMAIL PROTECTED]
> 
> I hope JFFNMS or I were helpful to you, if you can, please donate at 
> http://jffnms.org/donate
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
> Reporting Tool for open source databases. Create drag-&-drop reports. 
> Save time by over 75%! Publish reports on the web. Export to DOC, XLS,
RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> jffnms-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jffnms-users
> 

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS [EMAIL PROTECTED]

I hope JFFNMS or I were helpful to you, if you can, please donate at
http://jffnms.org/donate



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time by
over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to