forked from k0k/Zabbix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
45 lines (39 loc) · 3.48 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
1.- zabbix-json-register-host.pl: Simple perl script to access the JSON API Zabbix,
it use the methods of access and register, designed to deploy via puppet and register
each server without monkey assistence ;D, the requirements are perl-JSON-XS on Fedora/RHEL5+
or install via CPAN: cpan JSON::XS.
2.- db-pgstat.pl - Simple perl script designed to work with Zabbix to keep monitored
PostgreSQL databases some features monitored are: connection pool, buffers, locks, checkpoints,
must be used with zbx_Template_App_PostgreSQL.xml file.
3.- zbx_Template_App_PostgreSQL.xml: XML template to keep monitored PostgreSQL Enterprise Databases,
must be used with db-pgstat.pl perl script.
INSTRUCTIONS:
You just need to put the script: 'db-pgstat.pl' on the databases servers in a executable search path
and add user paramenter in zabbix_agentd.conf:
UserParameter=postgres.size,db-pgstat.pl --user postgres --database DATABASE --size
UserParameter=postgres.threads,db-pgstat.pl --user postgres --database DATABASE --threads
UserParameter=postgres.activeconn,db-pgstat.pl --user postgres --database DATABASE --activeconn
UserParameter=postgres.tupreturned,db-pgstat.pl --user postgres --database DATABASE --tupreturned
UserParameter=postgres.tupfetched,db-pgstat.pl --user postgres --database DATABASE --tupfetched
UserParameter=postgres.tupinserted,db-pgstat.pl --user postgres --database DATABASE --tupinserted
UserParameter=postgres.tupupdated,db-pgstat.pl --user postgres --database DATABASE --tupupdated
UserParameter=postgres.tupdeleted,db-pgstat.pl --user postgres --database DATABASE --tupdeleted
UserParameter=postgres.xactcommit,db-pgstat.pl --user postgres --database DATABASE --xactcommit
UserParameter=postgres.xactrollback,db-pgstat.pl --user postgres --database DATABASE --xactrollback
UserParameter=postgres.exclusivelock,db-pgstat.pl --user postgres --database DATABASE --exclusivelock
UserParameter=postgres.accessexclusivelock,db-pgstat.pl --user postgres --database DATABASE --accessexclusivelock
UserParameter=postgres.accesssharelockery,db-pgstat.pl --user postgres --database DATABASE --accesssharelockery
UserParameter=postgres.rowsharelock,db-pgstat.pl --user postgres --database DATABASE --rowsharelock
UserParameter=postgres.rowexclusivelock,db-pgstat.pl --user postgres --database DATABASE --rowexclusivelock
UserParameter=postgres.shareupdateexclusivelock,db-pgstat.pl --user postgres --database DATABASE --shareupdateexclusivelock
UserParameter=postgres.sharerowexclusivelock,db-pgstat.pl --user postgres --database DATABASE --sharerowexclusivelock
UserParameter=postgres.checkpoints_timed,db-pgstat.pl --user postgres --database DATABASE --checkpoints_timed
UserParameter=postgres.checkpoints_req,db-pgstat.pl --user postgres --database DATABASE --checkpoints_req
UserParameter=postgres.buffers_checkpoint,db-pgstat.pl --user postgres --database DATABASE --buffers_checkpoint
UserParameter=postgres.buffers_clean,db-pgstat.pl --user postgres --database DATABASE --buffers_clean
UserParameter=postgres.maxwritten_clean,db-pgstat.pl --user postgres --database DATABASE --maxwritten_clean
UserParameter=postgres.buffers_backend,db-pgstat.pl --user postgres --database DATABASE --buffers_backend
UserParameter=postgres.buffers_alloc,db-pgstat.pl --user postgres --database DATABASE --buffers_alloc
You can use --pass option for password database support (not recommend).
Zabbix discussions: http://www.zabbix.com/forum/showthread.php?p=99640#post99640
Template and perl file was tested for Zabbix 1.8.10, postgreSQL 8.4+ and RHEL 5.5