Skip to content
/ Zabbix Public
forked from k0k/Zabbix

Useful files and scripts used with Zabbix monitoring system

Notifications You must be signed in to change notification settings

beaudh/Zabbix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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: https://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

About

Useful files and scripts used with Zabbix monitoring system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 100.0%