Unix Technical Forum

Determining server load from client

This is a discussion on Determining server load from client within the Pgsql Performance forums, part of the PostgreSQL category; --> [Erik Jones - Wed at 09:31:48AM -0500] > I use cacti ( http://cacti.net ) which does the same thing ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-19-2008, 10:25 AM
Tobias Brox
 
Posts: n/a
Default Re: OT: Munin (was Re: Determining server load from client)

[Erik Jones - Wed at 09:31:48AM -0500]
> I use cacti (http://cacti.net) which does the same thing that munin
> does but in php instead. Here's what I use to db stats to it (again,
> php):


I haven't tried cacti, but our sysadm has done a little bit of research
and concluded "cacti is better". Maybe some day we'll move over.

Munin is generating all the graphs statically every fifth minute, while
cacti generates them on demand as far as I've understood. The munin
approach is pretty bloat, since one usually would watch the graphs much
more seldom than what they are generated (at least, we do). That's not
really an argument since CPU is cheap nowadays - but a real argument is
that the munin approach is less flexible. One would like to adjust the
graph (like, min/max values for both axis) while watching quite some
times.

> $actives_sql = "SELECT COUNT(*)
> FROM pg_stat_activity
> WHERE current_query NOT ILIKE '<idle>'
> AND now() - query_start > '1 second';";


So this one is quite similar to mine ...

> $db_stat_sql = "SELECT {$argv[2]}
> FROM pg_stat_database
> WHERE datname='$db_name';";


I was not aware of this view - it can probably be useful for us. I will
add this one when I get the time ... (I'm at vacation now).


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-19-2008, 10:26 AM
CAJ CAJ
 
Posts: n/a
Default Re: OT: Munin (was Re: Determining server load from client)

On 3/21/07, Erik Jones <erik@myemma.com> wrote:
>
>
> On Mar 21, 2007, at 4:13 PM, Tobias Brox wrote:
>
> [Erik Jones - Wed at 09:31:48AM -0500]
>
> I use cacti (http://cacti.net) which does the same thing that munin
> does but in php instead. Here's what I use to db stats to it (again,
> php):
>
>
> I haven't tried cacti, but our sysadm has done a little bit of research
> and concluded "cacti is better". Maybe some day we'll move over.
>
> Munin is generating all the graphs statically every fifth minute, while
> cacti generates them on demand as far as I've understood. The munin
> approach is pretty bloat, since one usually would watch the graphs much
> more seldom than what they are generated (at least, we do). That's not
> really an argument since CPU is cheap nowadays - but a real argument is
> that the munin approach is less flexible. One would like to adjust the
> graph (like, min/max values for both axis) while watching quite some
> times.
>
>
> Well, by "default", Cacti polls all of the data sources you've set up
> every five minutes as well as that's how the docs instruct you to set up the
> cron job for the poller. However, with a little understanding of how the
> rrdtool rras work, you could definitely poll more often and simply edit the
> existing rras and datasources to expect that or create new ones. And, yes,
> the graph customization is pretty cool although for the most part the just
> map what's available from the rrdtool graph functionality. If you do decide
> to set up Cacti I suggest you go straight to the faq section of the manual
> and read the part about going from a simple script to a graph. The main
> manual is almost entirely centered on the built-in networking (e.g. snmp)
> data sources and, as such, doesn't do much for explaining how to set up
> other data sources.
>



Has anyone had experience setting up something similar with Nagios? We
monitor servers using nagios and not having to install additional software
(cacti/munin) for postgres resource usage monitoring would be great.

Thanks in advance!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-19-2008, 10:26 AM
Stefan Kaltenbrunner
 
Posts: n/a
Default Re: OT: Munin (was Re: Determining server load from client)

CAJ CAJ wrote:
>
>
> On 3/21/07, *Erik Jones* <erik@myemma.com <mailto:erik@myemma.com>> wrote:
>
>
> On Mar 21, 2007, at 4:13 PM, Tobias Brox wrote:
>
>> [Erik Jones - Wed at 09:31:48AM -0500]
>>> I use cacti (http://cacti.net) which does the same thing that
>>> munin
>>> does but in php instead. Here's what I use to db stats to it
>>> (again,
>>> php):

>>
>> I haven't tried cacti, but our sysadm has done a little bit of
>> research
>> and concluded "cacti is better". Maybe some day we'll move over.
>>
>> Munin is generating all the graphs statically every fifth minute,
>> while
>> cacti generates them on demand as far as I've understood. The munin
>> approach is pretty bloat, since one usually would watch the graphs
>> much
>> more seldom than what they are generated (at least, we do).
>> That's not
>> really an argument since CPU is cheap nowadays - but a real
>> argument is
>> that the munin approach is less flexible. One would like to
>> adjust the
>> graph (like, min/max values for both axis) while watching quite some
>> times.

>
> Well, by "default", Cacti polls all of the data sources you've set
> up every five minutes as well as that's how the docs instruct you to
> set up the cron job for the poller. However, with a little
> understanding of how the rrdtool rras work, you could definitely
> poll more often and simply edit the existing rras and datasources to
> expect that or create new ones. And, yes, the graph customization
> is pretty cool although for the most part the just map what's
> available from the rrdtool graph functionality. If you do decide to
> set up Cacti I suggest you go straight to the faq section of the
> manual and read the part about going from a simple script to a
> graph. The main manual is almost entirely centered on the built-in
> networking ( e.g. snmp) data sources and, as such, doesn't do much
> for explaining how to set up other data sources.
>
>
>
> Has anyone had experience setting up something similar with Nagios? We
> monitor servers using nagios and not having to install additional
> software (cacti/munin) for postgres resource usage monitoring would be
> great.


a lot of nagios plugins can supply performance data in addition to the
OK/WARNING/CRITICAL state information - there are a number of solutions
out there that can take that information and graph it on a per
hosts/server base automatically - examples for such addons are
nagiosgrapher and n2rrd(or look at www.nagiosexchange.org it has a large
number of addons listed).


Stefan

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com