Giter Club home page Giter Club logo

zapache's Introduction

zapache 1.5 - Apache monitoring script for Zabbix

The script version 1.4 and template are taken from https://www.zabbix.com/wiki/templates/apache#method_3

What's new

Version 1.5

  • Zapache would cache received apache status page for 60 seconds by default. This eliminates the need to query apache for every item collected.
  • Added worker threads graph to a template
  • Added new items: status, ping, BusyWorkers, CPULoad
  • Added trigger for Apache status to a template
  • Ability to specify status page URL as a parameter to the script
  • Better error handling
  • Added sample conf files for Apache and Zabbix agent
  • Added measurement units to a template
  • Requires Zabbix version 2.0 and later.

Installation

CentOS 6.4/Zabbix 2.0 from EPEL repo

On the apache server:

Install files
sudo install -o root -g root -m 0755 zapache /var/lib/zabbixsrv/externalscripts/zapache
sudo install -d /etc/zabbix_agentd.conf.d
echo "Include=/etc/zabbix_agentd.conf.d/" | sudo tee -a /etc/zabbix_agentd.conf
sudo install -o root -g root -m 0644 userparameter_zapache.conf.sample /etc/zabbix_agentd.conf.d/userparameter_zapache.conf
sudo install -o root -g root -m 0644 httpd-server-status.conf.sample /etc/httpd/conf.d/httpd-server-status.conf
Restart
sudo service httpd restart
sudo service zabbix-agent restart
Check if it's working
sudo -u zabbix /var/lib/zabbixsrv/externalscripts/zapache Uptime
sudo -u zabbix zabbix_agentd -p | grep ^zapache
sudo -u zabbix zabbix_get -s localhost -k zapache[Uptime]

On Zabbix server

Now import zapache-template.xml and zapache-template-active.xml on Zabbix server and bind "Template App Apache Web Server zapache" OR "Template App Apache Web Server zapache Agent Active" template to Apache host.

zapache's People

Contributors

corecanarias avatar fifh avatar iprok avatar lorf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zapache's Issues

ZBX_NOTSUPPORTED: Unsupported item key.

I have zabbix agent version 2.4.2 and trying to monitor apache 2 on Ubuntu 14.04
I have imported al the templates and made all config changes
when i try to test the script using

sudo -u zabbix zabbix_get -s localhost -k zapache[Uptime]

i get the errror
ZBX_NOTSUPPORTED: Unsupported item key.

any ideas ?

zapache/CPULoad not working with Zabbix Agent 2.4.5

Hi,

We are using Apache on Ubuntu 14.04. We have installed Zabbix Agent 2.4.5 and using zapache version 1.5 for monitoring Apache performance. While zapache is working fine for all parameters for only CPULoad, it is reporting as ZBX_NOTSUPPORTED. Kindly note that it working fine with Zabbix Agent version 2.4.5 on CentOS 6.4 ad Zabbix Agent 2.2.2 on Ubuntu 14.04.

Could this be a specific issue with Zabbix Agent 2.4.5 on Ubuntu 14.04?

Please help.

Regards,
Ananth

Is there a way to monitor several remote apache servers from one agent?

I can invoke the shell script with different ips in one agent but i don't know how to configure in the frontend the fact that one agent is monitoring three apache remote servers with differents ips.

In my case my apache servers don't allow getting server-status from 127.0.0.1

Thank you in advance.

touch: cannot touch: Permission denied

The temp file used by zapache is the same filename for every user; thus if I run zapache then anyone else on the same machine will see the 'permission denied'. This shows up when a normal user or root runs zapache to test it before zabbix_agentd is able to run it for the first time.

The workaround is rm /tmp/zapache-* and prevent any users from launching zapache until zabbix_agentd has had a chance to run it (and lock everyone else out).

For a permanent fix, maybe use $UID as part of cache_prefix ?

Cannot evaluate function "last()"

I am getting item "hostname:zapache[BytesPerReqRealtime]" became not supported: Cannot evaluate function "last()".

any idea how to fix?
Thanks.

race condition with ping.

zapache_patch.txt
If the polling time is close to the cache time it is possible for the cache to go stale between the first timestamp check and the second check.

The attached patch should fix the problem.

BytesPerReqRealtime

The templates refer to "BytesPerReqRealtime" but zapache(.sh) only knows about "BytesPerReq". Why was this item added to the template when the script doesn't know where to get this detail?

.../externalscripts/zapache ZBX_NOTSUPPORTED

Is working for me in the Zabbix server but I can't make it work on an apache server.

Any suggestions? Thank you

[root@server02 conf.d]# zabbix_get -s 192.168.4.7 -k zapache[Uptime]

[root@server02 conf.d]# /var/lib/zabbixsrv/externalscripts/zapache Uptime
ZBX_NOTSUPPORTED

[root@server02 conf.d]#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.