Git Product home page Git Product logo

zabbix's Introduction

Zabbix

Script and templates for Zabbix 2.2.x, 2.4.x, 3.0.x, 3.2.x

  • In bin you will find Bash/Perl/PHP scripts used by some User Parameters (need to be installed on agent)
  • In sudoers.d you can find settings for sudo
  • In Templates there are XML files ready to import using Zabbix GUI
  • In zabbix_agentd.conf.d there are custom UserParameter (need to be installed on agent)

Templates was tested on Red Hat 5.x, 6.x and CentOS 5.x, 6.x. Common UserParameter were added to zabbix_agentd.conf.d/linux.conf file. Please add it to your own Zabbix Agent installation. Sometimes you need to use sudo for UserParameter. All rules are in file sudoers.d/zabbix.

Please let us know if you have any questions or concerns.

The Camels Team

Table of contents


  1. Templates

Template App Amavisd

Monitoring for Amavisd service.

Template App Apache

Monitoring for Apache service.

Template App APC

Monitoring memory usage of APC (http://pecl.php.net/package/APC) module. File bin/apc-stats.php need to be accessed via HTTP for example http://127.0.0.1/apc-stats.php

Template App BIND

Monitoring for BIND (DNS server) service. Checking also version of BIND.

Template App Brocade HBA

Monitoring for Network Adapters - Brocade. Template is using Discovery to create Items and Triggers. You need also add SUDO for zabbix user: zabbix ALL=(ALL) NOPASSWD: /usr/bin/bcu

Template App ClamAV

Monitoring for ClamAV.

Template App cPanel

Monitoring basic WHM/cPanel services.

Template App Dovecot

Monitoring for Dovecot.

Template App Etherpad

Monitoring for Etherpad (http://etherpad.org/)

Template App Exim

Monitoring for mail server Exim.

Template App Fail2Ban

Monitoring for Fail2Ban, an intrusion prevention software framework that protects computer servers from brute-force attacks.

Template App Iptables

Monitoring for Iptables. You need also add SUDO for zabbix user: zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -L INPUT -n

Template App lm_sensors

Monitoring CPU and MotherBoard temperatures by lm_senros module.

Template App mdadm

Monitoring mdadm arrays. Checking number of corrupted disk arrays.

Template Specific Process Memory Usage

Monitoring memory usag of Specific Process, like Python, unicorn-rails and Nginx.

Template App Monit

Monitoring for Monit service.

Template App MySQLd

Monitoring for MySQL 5.5, 5.6 and 5.7. It is using PHP-cli for monitoring. You need also add zabbix user to database. Please run SQL query:

CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
GRANT REPLICATION CLIENT, SELECT, PROCESS, SHOW DATABASES ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
FLUSH PRIVILEGES;

If you want change password, you need to edit files .my.cnf and also in file bin/ss_get_mysql_stats.php.

Template App MySQL Slave

Monitoring for replication in MySQL 5.5, 5.6 and 5.7. Please run SQL query:

CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
GRANT REPLICATION CLIENT, SELECT, PROCESS, SHOW DATABASES ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
FLUSH PRIVILEGES;

If you want change password, you need to edit files .my.cnf.

Template App Nginx

Monitoring for Nginx. It is using script nginx-check.sh written by Vincent Viallet.

Template App Nscd

Nscd is a daemon that provides a cache for the most common name service requests. Nscd provides caching for accesses of the passwd(5), group(5), and hosts(5) databases through standard libc interfaces, such as getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostbyname(3), and others.

You need also add SUDO for zabbix user: zabbix ALL=(ALL) NOPASSWD: /usr/sbin/nscd -g

Template App OPcache

Monitoring memory usage of OPcache (http://php.net/manual/en/book.opcache.php). File bin/opcache.php need to be accessed via HTTP for example http://127.0.0.1/opcache.php. Curl need to be installed on server.

Template App OpenDKIM

Monitoring for OpenDKIM.

Template App OpenVPN

Monitoring for OpenVPN service.

Template App Percona XtraBackup

Monitoring for Percona XtraBackup.

Template App PHP

Monitoring for PHP.

Template App php-fpm

Monitoring for php-fpm.

Template App Postfix

Monitoring for mail server Postfix.

Template App PostgreSQL

Monitoring for PostgreSQL.

Template App PowerPath

Monitoring for EMC PowerPath: Host-based software for automated data path management, failover and recovery, and optimized load balancing. PowerPath automates, standardizes, and optimizes data paths in physical and virtual environments as well as cloud deployments to deliver high availability and performance.

Template App Pure-FTPd

Monitoring for Pure-FTPd.

Template App RabbitMQ

Monitoring RabbitMQ (http://www.rabbitmq.com/) basic parameters like queues, exchanges and memory usage. You need install PHP on server for monitoring RabbitMQ. You need also add SUDO for zabbix user:

zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
zabbix ALL=(ALL) NOPASSWD: /usr/bin/php /etc/zabbix/bin/rabbit.php

Template App Redis

Monitoring for redis server 3.x. Support for redis cluster.

Template App Rserve

Monitoring for Rserve, Binary R server.

Template App Squid

Monitoring for Squid, a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.

Template App S.M.A.R.T.

Monitoring for S.M.A.R.T. enabled storage devices (HDD's, SSD's and other). Uses discovery script to populate disks. INFO: For non present S.M.A.R.T. values disable items on per-host level.

Template and scripts created by:

Michał Macioszek, Taras Baran, Michal Gębora, Marcin Wilk, Maks Bednarek, Anna Fałek, Mikołaj Szczuraszek

Template App Solr

Monitoring for Solr.

Template App Spamassassin

Monitoring for Spamassassin.

Template App SPAM Blacklist

Monitoring for SPAM Blacklist.

Template App Unicorn

Monitoring for Unicorn.

Template App Unicorn Rails

Monitoring for Unicorn Rails.

Template App vsftpd

Monitoring for vsftpd.

Template Device Back-UPS ES 700G

Monitoring of APC UPS dedicated battery power. Requires package apcupsd to be installed.

Template Device BigIP F5

Monitoring of F5 BigIP network load balancer. It uses SNMP items to monitor basic device parameters (CPU/RAM usage, hardware failure, global traffic) and also it discovers network interfaces, storage, virtual servers and pools.

Template Device Cisco ASA

Monitoring of Cisco ASA firewall. It uses SNMP items to monitor basic device parameters (CPU/RAM usage, hardware failure, global traffic) and also it discovers network interfaces. It requires manual addition of value mappings (Administration -> General -> Value Mapping)

Cisco ASA Failover status
9 - Active
10 - Standby

Cisco Interface Status
1 - up
2 - down

Template Device NetApp

Monitoring of NetApp dedicated NAS disk arrays. It uses SNMP items to monitor basic device parameters (CPU/RAM usage, disk status, hardware failure, global traffic) and also it discovers snap mirrors volumens (more discovery rules in the future). It requires manual addition of value mappings (Administration -> General -> Value Mapping)

NetAppcfInterconnectStatus
1 - not present
2 - down
3 - not present
4 - up

NetAppcfPartnerStatus
1 - maybe down
2 - ok
3 - dead

NetAppCfSetting
1 - not configured
2 - enabled
3 - disabled
4 - takeover by partner disabled
5 - dead

NetAppCfState
1 - dead
2 - can takeover
3 - cannot takeover
4 - takeover

NetAppFcpTgtStatus
1 - startup
2 - uninitialized
3 - initializingFW
4 - linkNotConnected
5 - waitingForLinkUp
6 - online
7 - linkDisconnected
8 - resetting
9 - offline
10 - offlinedByUserSystem
11 - unknown

NetAppFsStatus
1 - ok
2 - nearlyFull
3 - full

NetAppGlobalStatus
1 - other
2 - unknown
3 - ok
4 - non critical
5 - critical
6 - non recoverable

NetAppLunOnline
1 - false
2 - true

NetAppNvramBatteryStatus
1 - ok
2 - partially discharged
3 - fully discharged
4 - not present
5 - near end of life
6 - at end of life
7 - unknown
8 - overcharged

NetAppOverTemp
1 - no
2 - yes

NetAppRaidStatus
1 - active
2 - reconstructionInProgress
3 - parityReconstructionInProgress
4 - parityVerificationInProgress
5 - scrubbingInProgress
6 - failed
7 - addingSpare
8 - spare
9 - prefailed
10 - offline

NetAppSpareStatus
1 - spare
2 - addingspare
3 - bypassed
4 - unknown
5 - offline

NetAppVolStatus
1 - unmounted
2 - mounted
3 - frozen
4 - destroying
5 - creating
6 - mounting
7 - unmounting
8 - nofsinfo
9 - replaying

Template Device SNMP Generic

This is a generic template for SNMP (and any other in fact) devices that do not provide any information via SNMP/any other protocol. It only checks for host availability

Template Inventory

This template is used to collect data for automatic host inventory (architecture, operating system, hardware etc). Requires facter (puppetlabs)

Template OMSA

Collects data from OpenManage Server Administrator (OMSA) tool for Dell Servers. It monitors hardware components such as chassis, disks, power supplies, fans and other. It requires manual addition of value mappings (Administration -> General -> Value Mapping)

Dell Open Manage System Status
1 - Other
2 - Unknown
3 - OK
4 - NonCritical
5 - Critical
6 - NonRecoverable

You need also add SUDO for zabbix user: zabbix ALL=(ALL) NOPASSWD: /opt/dell/srvadmin/bin/omreport

Template SELinux

Monitoring for SELinux service.

Template Wowza

Monitoring for Wowza Streaming Engine server

zabbix's People

Contributors

berni69 avatar chusiang avatar irenshi avatar kporembinski avatar midereli avatar phemmer avatar volp1s 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  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  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

zabbix's Issues

Error with Exim Template

Zabbix 3.2
Cannot update template
Details
Created: Application "Exim" on "Zabbix server".
Item "net.tcp.service[smtp]" already exists on "Zabbix server", inherited from another template.

UserParameters for Postfix

This is a lovely set of goodies for Zabbix that I've enjoyed. As I was going through them I was not able to find agent UserParameters for Postfix. The xml template has keys which don't seem to exist in the agent configuration files provided, particularly:

mailqueue-postfix-queue
postfix.version

sed not working

Hi,

I think this line:
WPlst=$(curl -s $WPurl | egrep "([a-z]+.){1,7}[a-z]+" | sed -r "s|</?td>||g;/$Exclude/d")
should be
WPlst=$(curl -s $WPurl | egrep "([a-z]+.){1,7}[a-z]+" | sed -r "s|</?td>||g;/'$Exclude'/d")
Otherwise is no excluding the excluded blacklists

mysql php script

Hello,
Im having some issues with the php script. It seems it does not work. It writes the file to /tmp but when i run it by hand with --nocache it does not work. All graphs are on No Data.

I tried the following for debugging ( im not a php developer ) :

added at the start of the script try {

at the end of the script :
} catch (Exception $e) { echo $e->getMessage() . PHP_EOL; ob_end_flush(); }
The error was the following :
PHP Fatal error: Call to undefined function debug() in /etc/zabbix/agent-scripts/ss_get_mysql_stats.php on line 125

It seems that it cannot find the functions. If i move the debug function on the first line of the script, it will show errors at the next function parse_cmdline()

Im running the script on a centos 6 with php 5.6

Have any idea how to solve this or any hints except moving the functions up and down on the file ?

Missing templates

When adding the debian template I get this:

Cannot import template "Template OS Debian", linked templates "Template App Zabbix Agent - Debian, Template Inventory Debian" do not exist.

Thanks for sharing your templates!

opcache install?

Can you tell me where to put bin/opcache.php? I put it into apache directory so it could be accessed from http://127.0.0.1/zabbix/opcache.php. But in Zabbix [OPcache] Version reads like following.

<style> body { font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; margin: 0; padding: 0; }
    #container {
        width: 1024px;
        margin: auto;
        position: relative;
    }

    h1 {
        padding: 10px 0;
    }

    table {
        border-collapse: collapse;
    }

    tbody tr:nth-child(even) {
        background-color: #eee;
    }

    p.capitalize {
        text-transform: capitalize;
    }

    .tabs {
        position: relative;
        float: left;
        width: 60%;
    }

    .tab {
        float: left;
    }

    .tab label {
        background: #eee;
        padding: 10px 12px;
        border: 1px solid #ccc;
        margin-left: -1px;
        position: relative;
        left: 1px;
    }

    .tab [type=radio] {
        display: none;
    }

    .tab th, .tab td {
        padding: 8px 12px;
    }

    .content {
        position: absolute;
        top: 28px;
        left: 0;
        background: white;
        border: 1px solid #ccc;
        height: 450px;
        width: 100%;
        overflow: auto;
    }

    .content table {
        width: 100%;
    }

    .content th, .tab:nth-child(3) td {
        text-align: left;
    }

    .content td {
        text-align: right;
    }

    .clickable {
        cursor: pointer;
    }

    [type=radio]:checked ~ label {
        background: white;
        border-bottom: 1px solid white;
        z-index: 2;
    }

    [type=radio]:checked ~ label ~ .content {
        z-index: 1;
    }

    #graph {
        float: right;
        width: 40%;
        position: relative;
    }

    #graph > form {
        position: absolute;
        right: 60px;
        top: -20px;
    }

    #graph > svg {
        position: absolute;
        top: 0;
        right: 0;
    }

    #stats {
        position: absolute;
        right: 125px;
        top: 145px;
    }

    #stats th, #stats td {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    #partition {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 10;
        top: 0;
        left: 0;
        background: #ddd;
        display: none;
    }

    #close-partition {
        display: none;
        position: absolute;
        z-index: 20;
        right: 15px;
        top: 15px;
        background: #f9373d;
        color: #fff;
        padding: 12px 15px;
    }

    #close-partition:hover {
        background: #D32F33;
        cursor: pointer;
    }

    #partition rect {
        stroke: #fff;
        fill: #aaa;
        fill-opacity: 1;
    }

    #partition rect.parent {
        cursor: pointer;
        fill: steelblue;
    }

    #partition text {
        pointer-events: none;
    }

    label {
        cursor: pointer;
    }
</style>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
    var hidden = {};
    function toggleVisible(head, row) {
        if (!hidden[row]) {
            d3.selectAll(row).transition().style('display', 'none');
            hidden[row] = true;
            d3.select(head).transition().style('color', '#ccc');
        } else {
            d3.selectAll(row).transition().style('display');
            hidden[row] = false;
            d3.select(head).transition().style('color', '#000');
        }
    }
</script>
<title>PHP 5.6.21 with OpCache 7.0.6-dev</title>

PHP 5.6.21 with OpCache 7.0.6-dev

    <div class="tabs">

        <div class="tab">
            <input type="radio" id="tab-status" name="tab-group-1" checked>
            <label for="tab-status">Status</label>
            <div class="content">
                <table>
                    <tr><th>opcache_enabled</th><td>true</td></tr>
cache_fullfalse restart_pendingfalse restart_in_progressfalse used_memory73.25 MB ......

Zabbix 2.4.8 support for cpanel template

Can you add Zabbix 2.4.8 support for your cpanel template?

When I try to import I get this error

Details | ERROR: Import failed
Unknown import version.

Regards,

Error with inventory template

Zbbix 3.2 I have imported inventory and centos template
when I try to activate t server I receive the following error :
Details
Created: Application "Inventory" on "Zabbix server".
Two items ("OS" and "System information") cannot populate one host inventory field "OS", this would lead to a conflict.
Any idea >

Redis userparameter problem

I cannot get anything with:
echo -e "info\nquit" | redis-cli | grep $1":" | cut -d ':' -f 2
But I do get something with:
UserParameter=redis[*],redis-cli info | grep $1":" | cut -d ':' -f 2

The following is the zabbix_get output and my zabbix version is: (Zabbix) 3.0.3 (2016-06-25)

[root@7a05cd3872e5 /]# zabbix_get -s 10.117.30.65 -k redis[used_cpu_sys]

[root@7a05cd3872e5 /]# zabbix_get -s 10.117.30.65 -k redis[used_cpu_sys]
23338.83

Error import Template App S.M.A.R.T.xml

Good day! I have an error when importing template template App S.M.A.R.T.xml.


Created: Application "S.M.A.R.T." on "Template App S.M.A.R.T.".
mb_strlen() expects parameter 1 to be string, array given [conf.import.php:130 → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CDiscoveryRule->create() → CDiscoveryRule->createReal() → DB::insert() → DB::checkValueTypes() → zbx_strlen() → mb_strlen() in /usr/share/zabbix/include/func.inc.php:955]
Array to string conversion [conf.import.php:130 → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CAPIObject->create() → CAPIObject->call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CDiscoveryRule->create() → CDiscoveryRule->createReal() → DB::insert() → implode() in /usr/share/zabbix/include/classes/db/DB.php:450]
Error in query [INSERT INTO items (name,type,snmp_community,snmp_oid,delay,status,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,delay_flex,params,ipmi_sensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key
,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('Disks discovery','0','','','3600','0','','','0','0','','0','','','','','0','','','','','',Array,'30','','hdd_discovery','','10433','1','4','0',NULL,'27072')] [Unknown column 'Array' in 'field list']
SQL statement execution has failed "INSERT INTO items (name,type,snmp_community,snmp_oid,delay,status,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,delay_flex,params,ipmi_sensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key
,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('Disks discovery','0','','','3600','0','','','0','0','','0','','','','','0','','','','','',Array,'30','','hdd_discovery','','10433','1','4','0',NULL,'27072')".

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.