Zabbix icmpping not working cnt=0 rcv=0

After doing a clean install of zabbix-proxy on a CentOS 6 server, all our icmpping / icmppingsec items started to return zero values.

Zabbix debug log showed following lines:

31790:20140611:073610.004 In process_ping() hosts_count:1
31790:20140611:073610.004 /tmp/zabbix_proxy_31790.pinger
31790:20140611:073610.004 /usr/sbin/fping -C5 -p200 -b1024 -t1000 2>&1 The problem was in SELinux policy, however audit.log did not show any blocked events until the following command was run:

yum install -y policycoreutils-python
/usr/sbin/semodule -DB
The -D option disables dontaudit rules; the -B option rebuilds policy.
type=SYSCALL msg=audit(1402473587.551:550371): arch=c000003e syscall=5 success=no exit=-13 a0=0 a1=7fff2c862c70 a2=7fff2c862c70 a3=238 items=0 ppid=16064 pid=16065 auid=0 uid=500 gid=500 euid=500 suid=0 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=87526 comm="fping" exe="/usr/sbin/fping" subj=unconfined_u:system_r:ping_t:s0 key=(null)
type=AVC msg=audit(1402473588.556:550372): avc:  denied  { getattr } for  pid=16067 comm="fping" path="/tmp/zabbix_proxy_31776.pinger" dev=dm-0 ino=784936 scontext=unconfined_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:initrc_tmp_t:s0 tclass=file
To add an exception for this event run following command:
grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
semodule -i zabbix_fping.pp
Now icmpping / icmppingsec checks should succeed:
29940:20140611:071726.366 In process_ping() hosts_count:1
 29940:20140611:071726.366 /tmp/zabbix_proxy_29940.pinger
 29940:20140611:071726.366 /usr/sbin/fping -C5 -p200 -b24 -t900 2>&1 

Compiling PHP for Zabbix 2.2 frontend

To compile PHP for Zabbix 2.2 frontend you will need to use the following keys:

./configure --enable-mbstring --enable-sockets --with-mysql  --with-mysqli --with-ldap --enable-fpm --enable-bcmath  --with-gettext --with-xmlrpc --with-openssl --with-mcrypt --with-gd --with-zlib --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/lib 

PHP ini required values (minimal):

 memory_limit = 128M
 post_max_size = 16M
 upload_max_filesize = 2M
 max_execution_time = 300
 max_input_time = 300
 session.auto_start = 0

Zabbix backup script without history data

Here is simple backup script for Zabbix 2 configuration data (hosts, items, templates etc). It will not backup history/event/trend data, so backup file is relatively small.

Just replace ZBX_DB and ZBX_USER with Zabbix database name and username.

mysqldump -u ZBX_USER -p ZBX_DB \
	--ignore-table=ZBX_DB.acknowledges \
	--ignore-table=ZBX_DB.alerts \
	--ignore-table=ZBX_DB.auditlog \
	--ignore-table=ZBX_DB.auditlog_details \
	--ignore-table=ZBX_DB.escalations \ \
	--ignore-table=ZBX_DB.history \
	--ignore-table=ZBX_DB.history_log \
	--ignore-table=ZBX_DB.history_str \
	--ignore-table=ZBX_DB.history_str_sync \
	--ignore-table=ZBX_DB.history_sync \
	--ignore-table=ZBX_DB.history_text \
	--ignore-table=ZBX_DB.history_uint \
	--ignore-table=ZBX_DB.history_uint_sync \
	--ignore-table=ZBX_DB.trends \
	--ignore-table=ZBX_DB.trends_uint \
	| gzip > zbx_db.sql.gz

Zabbix SNMP – Error building asn.1 representation

When installing Zabbix on Debian 6, you may enconter an error with SNMP checks.

Error building asn.1 representation

First try to retrieve the most basic uptime value with snmpget

snmpget -v2c -c public SNMPv2-MIB::sysUpTime.0
Cannot find module (SNMPv2-MIB): At line 0 in (none)

If you get similar output as above you are missing package snmp-mibs-downloader.

You can install this package via apt:

apt-get install snmp-mibs-downloader

After installation restart zabbix-server

Zabbix 2 CheckPoint SNMP template

I have created Zabbix 2.x Template for monitoring CheckPoint products via SNMP.
This template utilizes custom CheckPoint MIBs that are located on SecurePlatform OS in $CPDIR/lib/snmp/

You can also download CHECKPOINT-MIB file here (from R75 version):

You need to copy this file to your Zabbix server, into directory /usr/share/snmp/mibs
To test new MIBs, run a snmpget command as follows:


snmpget -v2c -c <COMMUNITY_NAME> -Of <CHECKPOINT_IP> CHECKPOINT-MIB::svnVersion.0


snmpget -v3 -l authpriv -u <SNMPV3_USER> -A <SNMPV3_AUTH_PASS> -X <SNMPV3_PRIV_PASS> -Of CHECKPOINT-MIB::svnVersion.0

This command should return the product version: = STRING: “R75.40”

Download links for Templates:


SNMPv2 template will try to link standard Zabbix’s Templates:”Template SNMP Device and Template SNMP Disks.

SNMPv3 template will try to link my own SNMPv3 Zabbix Templates: Template SNMPv3 Device and Template SNMPv3 Disks.

You can get these SNMPv3 templates from here