Re: [collectd] how to set a threshold using postgresql plugin
Thank you very much for your time, Marc. I didnt try your proposal yet, but the wiki entry looks like having the kind of knowledge i was needing to solve the situation. Thanks again! Gerardo - Mensaje original - > De: "Marc Fournier" <marc.fourn...@camptocamp.com> > Para: "Gerardo Herzig" <gher...@fmed.uba.ar>, "collectd" > <collectd@verplant.org> > Enviados: Viernes, 11 de Marzo 2016 6:10:53 > Asunto: Re: [collectd] how to set a threshold using postgresql plugin > > Gerardo Herzig <gher...@fmed.uba.ar> writes: > > > Hi all. Im sending collectd values from a postgres DB to our > > collectd central server. > > In DB, there is using postgres plugin like: > > > > > > Statement "select sum(numbackends) as backends, sum(tup_inserted) > > as inserts, sum(tup_updated) as updates, sum(tup_deleted) as > > deletes > > from pg_stat_database;" > > > > Type gauge > > InstancePrefix total_backends > > ValuesFrom "backends" > > > > > > > > Interval 10 > > Host localhost > > User postgres > > Query db_movements > > > > > > And, in the "central" collectd server i want to set a threshold for > > that server, so > > " If that db server is over 100 connections in use, ALERT " > > > > At that point, i got confused about how to get it work. > > I have something like that: > > > > > > > > > > FailureMax 100.0 > > > > > > > > > > > > It throws no error, but even if i put a FailureMax of 2 or so, > > alert is not raising. > > So, anyone can help me to know to set that alert? > > I don't think the above specification will match the value you're > trying > to track. > > Try something like this: > > > > Instance "template1" > > Instance "total_backends" > FailureMax 100.0 > > > > > You might want to enable the unixsock plugin and run > "collectdctl listval" to make sure your specification actually > matches > an existing element name. > > Also, take a look at > https://collectd.org/wiki/index.php/Naming_schema > > Marc > ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] how to set a threshold using postgresql plugin
Gerardo Herzigwrites: > Hi all. Im sending collectd values from a postgres DB to our collectd central > server. > In DB, there is using postgres plugin like: > > > Statement "select sum(numbackends) as backends, sum(tup_inserted) as > inserts, sum(tup_updated) as updates, sum(tup_deleted) as deletes > from pg_stat_database;" > > Type gauge > InstancePrefix total_backends > ValuesFrom "backends" > > > > Interval 10 > Host localhost > User postgres > Query db_movements > > > And, in the "central" collectd server i want to set a threshold for that > server, so > " If that db server is over 100 connections in use, ALERT " > > At that point, i got confused about how to get it work. > I have something like that: > > > > > FailureMax 100.0 > > > > > > It throws no error, but even if i put a FailureMax of 2 or so, alert is not > raising. > So, anyone can help me to know to set that alert? I don't think the above specification will match the value you're trying to track. Try something like this: Instance "template1" Instance "total_backends" FailureMax 100.0 You might want to enable the unixsock plugin and run "collectdctl listval" to make sure your specification actually matches an existing element name. Also, take a look at https://collectd.org/wiki/index.php/Naming_schema Marc ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
[collectd] how to set a threshold using postgresql plugin
Hi all. Im sending collectd values from a postgres DB to our collectd central server. In DB, there is using postgres plugin like: Statement "select sum(numbackends) as backends, sum(tup_inserted) as inserts, sum(tup_updated) as updates, sum(tup_deleted) as deletes from pg_stat_database;" Type gauge InstancePrefix total_backends ValuesFrom "backends" Interval 10 Host localhost User postgres Query db_movements And, in the "central" collectd server i want to set a threshold for that server, so " If that db server is over 100 connections in use, ALERT " At that point, i got confused about how to get it work. I have something like that: FailureMax 100.0 It throws no error, but even if i put a FailureMax of 2 or so, alert is not raising. So, anyone can help me to know to set that alert? Thanks Gerardo ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd