Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
1
answers
6799
views
Zabbix install PHP 7 PHP 5.6 conflict on Centos7
I am attempting to install Zabbix 3.2 on Centos7 running PHP7. [Link to the walkthrough][1] The command: yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent The output: Loaded plugins: fastestmirror, langpacks, replace Loading mirror speeds from cached hostfile * base: mirror...
I am attempting to install Zabbix 3.2 on Centos7 running PHP7.
Link to the walkthrough
The command:
yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent
The output:
Loaded plugins: fastestmirror, langpacks, replace
Loading mirror speeds from cached hostfile
* base: mirror.us-midwest-1.nexcess.net
* epel: mirror.steadfast.net
* extras: mirror.millry.co
* ius: dfw.mirror.rackspace.com
* updates: repos-va.psychz.net
Resolving Dependencies
--> Running transaction check
---> Package zabbix-agent.x86_64 0:3.2.6-1.el7 will be installed
---> Package zabbix-get.x86_64 0:3.0.9-1.el7 will be updated
---> Package zabbix-get.x86_64 0:3.2.6-1.el7 will be an update
---> Package zabbix-server-mysql.x86_64 0:3.2.6-1.el7 will be installed
---> Package zabbix-web-mysql.noarch 0:3.2.6-1.el7 will be installed
--> Processing Dependency: zabbix-web = 3.2.6-1.el7 for package: zabbix-web-mysql-3.2.6-1.el7.noarch
--> Processing Dependency: php-mysql for package: zabbix-web-mysql-3.2.6-1.el7.noarch
--> Running transaction check
---> Package php56u-mysqlnd.x86_64 0:5.6.30-2.ius.centos7 will be installed
--> Processing Dependency: php56u-pdo(x86-64) = 5.6.30-2.ius.centos7 for package: php56u-mysqlnd-5.6.30-2.ius.centos7.x86_64
---> Package zabbix-web.noarch 0:3.2.6-1.el7 will be installed
--> Processing Dependency: php-gd for package: zabbix-web-3.2.6-1.el7.noarch
--> Processing Dependency: php-bcmath for package: zabbix-web-3.2.6-1.el7.noarch
--> Processing Dependency: php-ldap for package: zabbix-web-3.2.6-1.el7.noarch
--> Running transaction check
---> Package php56u-pdo.x86_64 0:5.6.30-2.ius.centos7 will be installed
--> Processing Dependency: php56u-common(x86-64) = 5.6.30-2.ius.centos7 for package: php56u-pdo-5.6.30-2.ius.centos7.x86_64
---> Package php71u-bcmath.x86_64 0:7.1.6-1.ius.centos7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.6-1.ius.centos7 for package: php71u-bcmath-7.1.6-1.ius.centos7.x86_64
---> Package php71u-gd.x86_64 0:7.1.6-1.ius.centos7 will be installed
---> Package php71u-ldap.x86_64 0:7.1.6-1.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-common.x86_64 0:5.6.30-2.ius.centos7 will be installed
--> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.30-2.ius.centos7.x86_64
---> Package php71u-common.x86_64 0:7.1.6-1.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-pecl-jsonc.x86_64 0:1.3.10-2.ius.centos7 will be installed
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Running transaction check
---> Package php56u-pear.noarch 1:1.10.4-1.ius.centos7 will be installed
--> Processing Dependency: php56u-cli for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch
--> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch
--> Processing Dependency: php56u-xml for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch
--> Running transaction check
---> Package php56u-cli.x86_64 0:5.6.30-2.ius.centos7 will be installed
---> Package php56u-process.x86_64 0:5.6.30-2.ius.centos7 will be installed
---> Package php56u-xml.x86_64 0:5.6.30-2.ius.centos7 will be installed
--> Processing Conflict: php70u-cli-7.0.19-1.ius.centos7.x86_64 conflicts php-cli Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php70u-cli.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-cli.x86_64 0:7.0.20-1.ius.centos7 will be an update
--> Processing Dependency: php-common(x86-64) = 7.0.20-1.ius.centos7 for package: php70u-cli-7.0.20-1.ius.centos7.x86_64
--> Running transaction check
---> Package php70u-common.x86_64 0:7.0.19-1.ius.centos7 will be updated
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: mod_php70u-7.0.19-1.ius.centos7.x86_64
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mbstring-7.0.19-1.ius.centos7.x86_64
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mcrypt-7.0.19-1.ius.centos7.x86_64
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-pdo-7.0.19-1.ius.centos7.x86_64
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-xml-7.0.19-1.ius.centos7.x86_64
--> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-json-7.0.19-1.ius.centos7.x86_64
---> Package php70u-common.x86_64 0:7.0.20-1.ius.centos7 will be an update
--> Running transaction check
---> Package mod_php70u.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package mod_php70u.x86_64 0:7.0.20-1.ius.centos7 will be an update
---> Package php70u-json.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-json.x86_64 0:7.0.20-1.ius.centos7 will be an update
---> Package php70u-mbstring.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-mbstring.x86_64 0:7.0.20-1.ius.centos7 will be an update
---> Package php70u-mcrypt.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-mcrypt.x86_64 0:7.0.20-1.ius.centos7 will be an update
---> Package php70u-pdo.x86_64 0:7.0.19-1.ius.centos7 will be updated
--> Processing Dependency: php-pdo(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mysqlnd-7.0.19-1.ius.centos7.x86_64
---> Package php70u-pdo.x86_64 0:7.0.20-1.ius.centos7 will be an update
---> Package php70u-xml.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-xml.x86_64 0:7.0.20-1.ius.centos7 will be an update
--> Running transaction check
---> Package php70u-mysqlnd.x86_64 0:7.0.19-1.ius.centos7 will be updated
---> Package php70u-mysqlnd.x86_64 0:7.0.20-1.ius.centos7 will be an update
--> Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php56u-common
--> Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php70u-common
--> Processing Conflict: php70u-common-7.0.20-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php70u-common-7.0.20-1.ius.centos7.x86_64 conflicts php56u-common
--> Processing Conflict: php70u-cli-7.0.20-1.ius.centos7.x86_64 conflicts php-cli Processing Conflict: php70u-json-7.0.20-1.ius.centos7.x86_64 conflicts php-json Processing Conflict: php70u-mysqlnd-7.0.20-1.ius.centos7.x86_64 conflicts php-mysql Processing Conflict: php70u-mysqlnd-7.0.20-1.ius.centos7.x86_64 conflicts php-mysqlnd Processing Conflict: php70u-pdo-7.0.20-1.ius.centos7.x86_64 conflicts php-pdo Processing Conflict: php70u-xml-7.0.20-1.ius.centos7.x86_64 conflicts php-xml Finished Dependency Resolution
Error: php71u-common conflicts with php56u-common-5.6.30-2.ius.centos7.x86_64
Error: php70u-xml conflicts with php56u-xml-5.6.30-2.ius.centos7.x86_64
Error: php71u-common conflicts with php70u-common-7.0.20-1.ius.centos7.x86_64
Error: php70u-mysqlnd conflicts with php56u-mysqlnd-5.6.30-2.ius.centos7.x86_64
Error: php70u-cli conflicts with php56u-cli-5.6.30-2.ius.centos7.x86_64
Error: php70u-pdo conflicts with php56u-pdo-5.6.30-2.ius.centos7.x86_64
Error: php70u-common conflicts with php56u-common-5.6.30-2.ius.centos7.x86_64
Error: php70u-json conflicts with php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Attempted to fix using
yum-plugin-replace
commands
For example:
yum replace php56u-common --replace-with php71u-common
got this output:
Loaded plugins: fastestmirror, langpacks, replace
Replacing packages takes time, please be patient...
Error: Package 'php56u-common' is not installed.
also tried (per this link) :
yum replace php-common --replace-with php71u-common
and got this output:
Loaded plugins: fastestmirror, langpacks, replace
Replacing packages takes time, please be patient...
Error: Package 'php-common' is not installed
I noticed these php56 packages were not installed when doing a yum list installed
, but do show up when doing a yum list available
.
Any insight on how to fix this is appreciated.
Kayne Khoury
(39 rep)
Jun 27, 2017, 03:55 PM
• Last activity: Jul 24, 2025, 09:07 AM
0
votes
1
answers
2801
views
snmptt running as non-root, writting to file as root
I'm running `snmptt` as a SNMP trap handler for `snmptrapd`, with the aim being to write to a trap file that can be read and processed by Zabbix. I have set up snmptt to run as the `zabbix` user by changing the `init` script. # grep daemon /etc/init.d/snmptt # description: SNMP Trap Translator daemo...
I'm running
snmptt
as a SNMP trap handler for snmptrapd
, with the aim being to write to a trap file that can be read and processed by Zabbix.
I have set up snmptt to run as the zabbix
user by changing the init
script.
# grep daemon /etc/init.d/snmptt
# description: SNMP Trap Translator daemon
# Short-Description: SNMP Trap Translator daemon
OPTIONS="--daemon"
daemon --user=zabbix /usr/sbin/snmptt $OPTIONS
snmpttt
is running as expected as the zabbix
user, the same user which is running the Zabbix server.
# ps -ef | grep snmp
root 3796 1 0 Jun19 ? 00:13:04 /usr/sbin/snmpd -LS0-6d -Lf /dev/null -p /var/run/snmpd.pid
zabbix 4444 1 0 15:00 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
zabbix 4445 4444 0 15:00 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
root 9300 29899 0 15:25 pts/2 00:00:00 grep snmp
zabbix 16576 16511 0 Aug16 ? 00:00:11 /path/to/sbin/zabbix_server: snmp trapper [processed data in 0.000007 sec, idle 1 sec]
root 16600 1 0 Aug16 ? 00:00:07 /usr/sbin/snmptrapd -A -Lf /var/log/snmptrapd.log -D -p /var/run/snmptrapd.pid
The log file to send traps caught is /var/tmp/zabbixtest/zabbix_traps.tmp
# egrep "^(log_file|pid)" /etc/snmp/snmptt.ini
pid_file = /var/run/snmptt/snmptt.pid
log_file=/var/tmp/zabbixtest/zabbix_traps.tmp
However, the trap log file is being written to, and owned by the root
user, not as the zabbix
user as expected. Moreover, the permissions on the file are 0640
, meaning that the zabbix user running the server is not able to read the file.
# service snmptt stop
Stopping snmptt: [ OK ]
# rm /var/tmp/zabbixtest/zabbix_traps.tmp
rm: remove regular file `/var/tmp/zabbixtest/zabbix_traps.tmp'? y
# ls -lia /var/tmp/zabbixtest/zabbix_traps.tmp
ls: cannot access /var/tmp/zabbixtest/zabbix_traps.tmp: No such file or directory
# ls -lia /var/tmp/zabbixtest/
total 24
263224 drwxrwxr-x 2 root zabbix 4096 Aug 17 15:32 .
262145 drwxrwxrwt 7 root root 4096 Aug 17 14:53 ..
# service snmptt start
Starting snmptt: PID file: /var/run/snmptt/snmptt.pid
[ OK ]
# ps -ef | grep snmptt
zabbix 9944 1 0 15:32 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
zabbix 9945 9944 0 15:32 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
root 9981 29899 0 15:32 pts/2 00:00:00 grep snmptt
# ps -ef | grep snmp
root 3796 1 0 Jun19 ? 00:13:04 /usr/sbin/snmpd -LS0-6d -Lf /dev/null -p /var/run/snmpd.pid
zabbix 9944 1 0 15:32 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
zabbix 9945 9944 0 15:32 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
root 9986 29899 0 15:32 pts/2 00:00:00 grep snmp
zabbix 16576 16511 0 Aug16 ? 00:00:11 /path/to/sbin/zabbix_server: snmp trapper [processed data in 0.000079 sec, idle 1 sec]
root 16600 1 0 Aug16 ? 00:00:07 /usr/sbin/snmptrapd -A -Lf /var/log/snmptrapd.log -D -p /var/run/snmptrapd.pid
# ls -lia /var/tmp/zabbixtest/zabbix_traps.tmp
262265 -rw-r----- 1 root root 122 Aug 17 15:32 /var/tmp/zabbixtest/zabbix_traps.tmp
Note the file permissions and ownership of /var/tmp/zabbixtest/zabbix_traps.tmp
.
Accordingly, the zabbix
user is unable to read the file and is hence unable to process it.
I can fix by manually modifying the mode of the trap file /var/tmp/zabbixtest/zabbix_traps.tmp
to 0644
, for example, but I am hoping there is a better way, e.g. via a configuration file, since the file location will most likely change. (There are some blog sites recommending to change the mode to 0777, obviously that is not the correct solution).
I guess it is due to the snmptrapd
configuration, running as root, but not sure the best way to fix this.
**My questions:**
Why is the trap log file being written to as the root
user with 0640
permissions, instead of as zabbix
user running snmptt
?
How can/should I configure snmptt
and/or snmptrapd
to have the trap file be owned and readable by the zabbix
user instead of root user.
**Other relevant info:**
snmptrapd config file:
# grep -v '^#' /etc/snmp/snmptrapd.conf
disableAuthorization yes
traphandle default /usr/sbin/snmptthandler
Running RHEL 6.6
hilcharge
(359 rep)
Aug 17, 2017, 06:54 AM
• Last activity: Jul 19, 2025, 05:00 PM
2
votes
2
answers
5279
views
Zabbix server running not running. Value no in zabbix dashboard on Centos7
What should I do, I have set up everything for what I thought would be a wonderful well running zabbix server and now it is not running on the final step. I cannot figure out what went wrong. How can I fix this? this is my first time, please help thanks :)[![enter image description here][1]][1] ?php...
What should I do, I have set up everything for what I thought would be a wonderful well running zabbix server and now it is not running on the final step. I cannot figure out what went wrong. How can I fix this? this is my first time, please help thanks :)
?php
// Zabbix GUI configuration file.
$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = 'localhost';
$DB['PORT'] = '0';
$DB['DATABASE'] = 'zabbix';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = 'zabbix_db_pass';
// Schema name. Used for PostgreSQL.
$DB['SCHEMA'] = '';
// Used for TLS connection.
$DB['ENCRYPTION'] = false;
$DB['KEY_FILE'] = '';
$DB['CERT_FILE'] = '';
$DB['CA_FILE'] = '';
$DB['VERIFY_HOST'] = false;
$DB['CIPHER_LIST'] = '';
// Use IEEE754 compatible value range for 64-bit Numeric (float) history values.
"/etc/zabbix/web/zabbix.conf.php" 47L, 1484C
///////zabix.conf.php starts here
// Use IEEE754 compatible value range for 64-bit Numeric (float) history values.
// This option is enabled by default for new Zabbix installations.
// For upgraded installations, please read database upgrade notes before enabling this$
$DB['DOUBLE_IEEE754'] = true;
$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';
$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
// Uncomment this block only if you are using Elasticsearch.
// Elasticsearch url (can be string if same url is used for all types).
//$HISTORY['url'] = [
// 'uint' => 'http://localhost:9200',
// 'text' => 'http://localhost:9200'
//];
I also noticed this little message in firewall status:
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-11-22 13:14:25 EST; 2h 5min ago
Docs: man:firewalld(1)
Main PID: 767 (firewalld)
Tasks: 2
CGroup: /system.slice/firewalld.service
it seems like there is just so much going on in my server and I do not know where to edit it. Can anyone give me some help on finding a guide compatible with CentOS Linux release 7.9,2009 (core)

Amanda W
(21 rep)
Nov 22, 2021, 08:41 PM
• Last activity: Jul 8, 2025, 09:02 PM
2
votes
1
answers
3214
views
fping from zabbix agent - permission denied
I know there are several topics about fping and zabbix, but I've read through them all and I am still having trouble getting something that should be pretty simple working. I am trying to do a simple ping test from a host (that's running zabbix agent) to an external host. In my zabbix_agentd.conf fi...
I know there are several topics about fping and zabbix, but I've read through them all and I am still having trouble getting something that should be pretty simple working.
I am trying to do a simple ping test from a host (that's running zabbix agent) to an external host.
In my zabbix_agentd.conf file I have setup a UserParameter such as:
UserParameter=vpnPing[*],fping $1 |grep -c alive
My fping permissions are as such:
# ls -l /sbin/fping
-rwsr-sr-x. 1 root zabbix 52904 Aug 5 2019 /sbin/fping
If I run the zabbix_agentd test I get (fake ip listed for example purposes)
# zabbix_agentd -t vpnPing[123.456.78.901]
vpnPing[123.456.78.901] [t|1]
So that seems to work.
When I go to the zabbix UI and look at the latest data I see:
2020-06-04 17:55:30 sh: /usr/sbin/fping: Permission denied
0
The interesting this is the 0 at the bottom. I've also seen it be 1 at times. That sounds like something is working, but I don't get why I get the permission denied.
Also when I look at the audit log I see:
type=AVC msg=audit(1591330891.927:15933): avc: denied { execute } for pid=52320 comm="sh" name="fping" dev="nvme0n1p2" ino=8410299 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_u:object_r:ping_exec_t:s0 tclass=file permissive=0
type=SYSCALL msg=audit(1591330891.927:15933): arch=c000003e syscall=21 success=no exit=-13 a0=5601874ee450 a1=1 a2=7ffe62a48db0 a3=0 items=0 ppid=52319 pid=52320 auid=4294967295 uid=990 gid=988 euid=990 suid=990 fsuid=990 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm="sh" exe="/usr/bin/bash" subj=system_u:system_r:zabbix_agent_t:s0 key=(null)ARCH=x86_64 SYSCALL=access AUID="unset" UID="zabbix" GID="zabbix" EUID="zabbix" SUID="zabbix" FSUID="zabbix" EGID="zabbix" SGID="zabbix" FSGID="zabbix"
type=PROCTITLE msg=audit(1591330891.927:15933): proctitle=7368002D63006670696E67203136372E3134342E38392E323238207C67726570202D6320616C697665
I'm running RHEL 8.2.
# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 4.4.9
$ zabbix_server -V
zabbix_server (Zabbix) 4.4.9
# fping -v
fping: Version 3.16
I have the Item in Zabbix configured as Type: Zabbix agent
If I try:
zabbix_get -s [my_zabbix_server_ip] -k vpnPing[123.456.78.901]
it does timeout (not sure why as I can ping it just fine normally): zabbix_get : Timeout while executing operation
But not sure that last part with zabbix_get is relevant b/c the checks to seem to be getting back to the zabbix server but it just says permission denied.
I've been struggling with this for a while now and hoping someone can help me out?
Vishal Shah
(21 rep)
Jun 5, 2020, 12:54 AM
• Last activity: Apr 11, 2025, 06:06 AM
1
votes
4
answers
2422
views
Zabbix-server-mysql on docker centos:latest skips some files during install
I tried to install Zabbix-server-mysql on genuine centos image in docker container: [root@desktop]# docker run --rm -ti centos:latest /bin/bash [root@0e4f336ff674]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm [root@0e4f336ff674]# rpm -ivh http://dl.fedoraproject.org/pub...
I tried to install Zabbix-server-mysql on genuine centos image in docker container:
[root@desktop]# docker run --rm -ti centos:latest /bin/bash
[root@0e4f336ff674]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
[root@0e4f336ff674]# rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
[root@0e4f336ff674]# yum install http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-server-mysql-3.2.3-1.el7.x86_64.rpm
This manual:
https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages/server_installation_with_mysql requires a file "/usr/share/doc/zabbix-server-mysql-3.2.3/create.sql.gz" to be created during the installation due to its necessity to create zabbix DB on MySQL server. But this file appears missing:
[root@0e4f336ff674]# ls -ld /usr/share/doc/zabbix-server-mysql-3.2.3/create.sql.gz
ls: cannot access /usr/share/doc/zabbix-server-mysql-3.2.3/create.sql.gz: No such file or directory
The funny part is this file actually EXISTS in *.rpm file:
[root@0e4f336ff674]# rpm2cpio http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-server-mysql-3.2.3-1.el7.x86_64.rpm | cpio -t | grep create
./usr/share/doc/zabbix-server-mysql-3.2.3/create.sql.gz
Moreover, the package doesn't seem to have any pre- or post-install scripts that could delete the
/usr/share/doc/zabbix-server-mysql-3.2.3/
directory:
[root@0e4f336ff674]# rpm -qp --scripts http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-server-mysql-3.2.3-1.el7.x86_64.rpm
preinstall scriptlet (using /bin/sh):
getent group zabbix > /dev/null || groupadd -r zabbix
getent passwd zabbix > /dev/null || \
useradd -r -g zabbix -d /var/lib/zabbix -s /sbin/nologin \
-c "Zabbix Monitoring System" zabbix
:
postinstall scriptlet (using /bin/sh):
if [ $1 -eq 1 ] ; then
# Initial installation
/usr/bin/systemctl preset zabbix-server.service >/dev/null 2>&1 || :
fi
/usr/sbin/update-alternatives --install /usr/sbin/zabbix_server \
zabbix-server /usr/sbin/zabbix_server_mysql 10
:
So what could be the problem with it?
P.S.: I am aware of the exising official zabbix-on-docker images: github.com/zabbix/zabbix-docker
Alessandro Cattaneo
(21 rep)
Feb 1, 2017, 05:53 PM
• Last activity: Aug 24, 2024, 05:00 AM
0
votes
0
answers
127
views
Zabbix ssh check doesn't show the output of the test script
I've created an ssh check item for my host il06.example.com in Zabbix. Exported to yaml it is ``` zabbix_export: version: '6.4' host_groups: - uuid: cfe19b0ae08444358fbe515d88fd6095 name: 'Linux hosts' hosts: - host: il06.example.com name: il06.example.com templates: - name: 'ICMP Ping' - name: 'Lin...
I've created an ssh check item for my host il06.example.com in Zabbix. Exported to yaml it is
zabbix_export:
version: '6.4'
host_groups:
- uuid: cfe19b0ae08444358fbe515d88fd6095
name: 'Linux hosts'
hosts:
- host: il06.example.com
name: il06.example.com
templates:
- name: 'ICMP Ping'
- name: 'Linux by Zabbix agent active'
groups:
- name: 'Linux hosts'
interfaces:
- ip: 10.19.96.122
dns: il06.example.com
interface_ref: if1
items:
- name: 'ssh check'
type: SSH
key: 'ssh.run[''ssh check'']'
delay: 15m
history: 30d
value_type: TEXT
params: /bin/hostname
authtype: PUBLIC_KEY
username: zabbix
publickey: id_ed25519.pub
privatekey: id_ed25519
interface_ref: if1
inventory_mode: DISABLED
This item has been configured according to the documentation https://www.zabbix.com/documentation/6.4/en/manual/config/items/itemtypes/ssh_checks . Actually it seems to work, except that the output of /bin/hostname is lost. It doesn't show up in the item history, and Zabbix' built in test doesn't show the hostname either. If I login as user "zabbix" on the server and try "ssh il06 /bin/hostname", it returns "il06.example.com", of course.
Zabbix server and agent are running on Debian 12, using the most recent Debian packages for Zabbix 6.4 found on https://www.zabbix.com/download . libssh on the server is Debian's version 0.10.6. Openssh on the peer is version 9.7.
Did I miss something here? Every helpful hint is highly appreciated.
PS: Of course I checked Zabbix' bug tracker for similar problems. The Zabbix server log doesn't indicate any problems. either. I also tried to cut off the newline using "echo -n /bin/hostname
"
Harri
(23 rep)
Jul 28, 2024, 04:55 PM
• Last activity: Jul 28, 2024, 09:08 PM
0
votes
2
answers
941
views
unable to send mail test zabbix
I want to setup email notification using zabbix. When I click _Test_ I get notification > Access denied to remote resource: Remote access denied: 501 My SMTP config: - `smtp.office365.com` - port : 587 - connection security : STARTTLS - username : `myemail@domain.com` - password : (redacted) When us...
I want to setup email notification using zabbix. When I click _Test_ I get notification
> Access denied to remote resource: Remote access denied: 501
My SMTP config:
-
smtp.office365.com
- port : 587
- connection security : STARTTLS
- username : myemail@domain.com
- password : (redacted)
When using GMail I get same notification.
Sonya
(3 rep)
Feb 21, 2024, 08:29 AM
• Last activity: May 24, 2024, 02:21 PM
0
votes
1
answers
4547
views
Installing Zabbix-agent2 on amazon linux2
I am trying to install zabbix-agent2 as mentioned in this [link][1] agent 2 is available in pre-compiled Zabbix packages. I ran > rpm -Uvh > https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-release-5.4-1.el8.noarch.rpm Then search for Zabbix-agent2 using yum and it shows available. However, w...
I am trying to install zabbix-agent2 as mentioned in this link agent 2 is available in pre-compiled Zabbix packages.
I ran
> rpm -Uvh
> https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-release-5.4-1.el8.noarch.rpm
Then search for Zabbix-agent2 using yum and it shows available. However, when I try to install using
> Sudo yum install zabbix-agent2
It shows Error: Package: zabbix-agent2-5.4.9-1.el8.x86_64 (zabbix)
Requires: libc.so.6(GLIBC_2.28)(64bit)
How can I resolve this? Is there any alternative way to install it?
Harshal Bulsara
(103 rep)
Dec 28, 2021, 08:26 AM
• Last activity: Oct 6, 2023, 03:14 AM
1
votes
1
answers
1828
views
Adding host to Zabbix 6.2 through ansible failed (worked on 6.0)
I have an issue with the conversion (migration) from zabbix 6.0 to zabbix 6.2. I have a playbook in Ansible to automatically add a host to zabbix with some host_groups and Templates predefined which worked on Zabbix 6.0 but in 6.2 zabbix added the Template_groups and now the playbook complains that...
I have an issue with the conversion (migration) from zabbix 6.0 to zabbix 6.2.
I have a playbook in Ansible to automatically add a host to zabbix with some host_groups and Templates predefined which worked on Zabbix 6.0 but in 6.2 zabbix added the Template_groups and now the playbook complains that it can't find the templates anymore.
Here is a part of the playbook:
- name: ZABBIX - Create or update host
local_action:
module: community.zabbix.zabbix_host
server_url: https://monitor.localdomain
login_user: "a*******a"
login_password: "S*********************y"
host_name: "{{ ansible_hostname }}"
visible_name: "{{ ansible_hostname }}"
tls_psk_identity: "{{ ansible_hostname }}"
tls_accept: 2
tls_connect: 2
tls_psk: "{{ psk.stdout }}"
host_groups:
- Linux servers
link_templates:
- Template OS Linux
- Template YUM Updates
status: enabled
state: present
inventory_mode: automatic
interfaces:
- type: 1
main: 1
useip: 1
ip: "{{ ansible_default_ipv4.address }}"
- type: 2
main: 1
useip: 1
ip: "{{ ansible_default_ipv4.address }}"
details:
community: "{$SNMP_COMMUNITY}"
version: 2
proxy: "ZabbixProxy"
vars:
ansible_python_interpreter: "/usr/bin/python3"
tags:
- zabbix-agent
This worked perfectly on 6.0 and added the servers to the host_group Linux Servers and added the templates OS Linux and YUM updates with no issue.
Now in 6.2 it complains that it can't find the templates, and if I outhash the templates it complains that it can't find the host_group. When I outhash that it complains that it has to have at least 1 host group.... :|
I tried all combinations of templates, as the templates are now in the template group: "Templates/Operating Systems"
I even added a template_groups: section in the playbook as that is a valid field in rust, but apparently it is not for ansible as now it complains on a invalid module found.
How do I change/add the templategroup the correct way...?
Thanks for reading and thinking along with me.
SHLelieveld
(443 rep)
Dec 30, 2022, 09:11 AM
• Last activity: Jul 2, 2023, 08:26 PM
1
votes
0
answers
459
views
Increment of HDDs disk read request waiting time after linux kernel update
Issue presentation: - Environment: Debian (bullseye) based distro (proxmox VE) on top of ZFS - Action: Kernel update from 5.15.74-1 to 5.19.17-1 - Consequence: Increment of HDDs disk read request waiting time I have a zabbix instance showing that the property "Disk read request avg waiting time (r_a...
Issue presentation:
- Environment: Debian (bullseye) based distro (proxmox VE) on top of ZFS
- Action: Kernel update from 5.15.74-1 to 5.19.17-1
- Consequence: Increment of HDDs disk read request waiting time
I have a zabbix instance showing that the property "Disk read request avg waiting time (r_await)" has increased in a x2 - x3 factor after updating the kernel, from below 20 ms to more than 40 ms. In the machine I have 3 SSD, all of them unaffected; and 3 HDD, all of them affected by this issue in a similar way. Writing waiting time on HDD it's also unaffected (avg = 0.75 ms). If I run a read intensive process like
I have a zabbix instance showing that the property "Disk read request avg waiting time (r_await)" has increased in a x2 - x3 factor after updating the kernel, from below 20 ms to more than 40 ms. In the machine I have 3 SSD, all of them unaffected; and 3 HDD, all of them affected by this issue in a similar way. Writing waiting time on HDD it's also unaffected (avg = 0.75 ms). If I run a read intensive process like
if=/dev/sdx...
, then the waiting time of the disk it's reduced to 2-3 ms.
So the question are:
- Why I have such high read request waiting time on all my HDD? It has increased after the kernel update, but before it was already way higher than HDD write waiting time (near 20 ms avg vs 0.75 ms avg)
- Why it's reduced to 2-3 ms when doing intensive reading? Why it's still 3 times higher than write wait time?
Best regards.
Héctor
(348 rep)
Dec 28, 2022, 12:58 PM
-1
votes
1
answers
5880
views
SMTP relay check (test) (Postfix)
I want to add item/trigger to Zabbix to check that some server A can send mails via mail server B (SMTP relay) **without sending on real/fake email** and I haven't a problem with firewall/iptables rules and postfix rules. Mail service belongs to me and I use Postfix / CentOS 7. How can I do it? I kn...
I want to add item/trigger to Zabbix to check that some server A can send mails via mail server B (SMTP relay) **without sending on real/fake email** and I haven't a problem with firewall/iptables rules and postfix rules. Mail service belongs to me and I use Postfix / CentOS 7.
How can I do it?
I know that I can send real mail via mailx or netcat, the command will be something like this:
echo "Test message" | mailx -v -r "from@some.com" -s "Some subject" -S smtp="mail-server-b.com:25" to@some.org
and parse result but I don't want to do it.
Harlam
(99 rep)
Dec 5, 2017, 03:27 PM
• Last activity: Nov 19, 2022, 05:04 PM
1
votes
0
answers
853
views
Configuring zabbix server on centos 9 stream
i've been trying to install those packages required for installing zabbix on centos 9 stream but i came to a problem. I've been following this guide for installing zabbix on official webpage here: https://www.zabbix.com/download?zabbix=6.2&os_distribution=centos&os_version=9&components=server_fronte...
i've been trying to install those packages required for installing zabbix on centos 9 stream but i came to a problem. I've been following this guide for installing zabbix on official webpage here:
https://www.zabbix.com/download?zabbix=6.2&os_distribution=centos&os_version=9&components=server_frontend_agent&db=mysql&ws=apache but i got stuck on this packages instalations:
**dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent**
My error is: Problem: package zabbix-web-deps-6.2.4-release1.el9.noarch requires zabbix-web = 6.2.4-release1.el9, but none of the providers can be installed
- cannot install both zabbix-web-6.2.4-release1.el9.noarch and zabbix-web-1:6.0.8-1.el9.noarch
- package zabbix-apache-conf-6.2.4-release1.el9.noarch requires zabbix-web-deps = 6.2.4-release1.el9, but none of the providers can be installed
- package zabbix-web-mysql-1:6.0.8-1.el9.noarch requires zabbix-web = 1:6.0.8-1.el9, but none of the providers can be installed
- cannot install the best candidate for the job
Only thing i did on my VM before i ran this command was disabling selinux and firewalld and dnf update.
Should i install mariadb or php server before i run this command? I am kinda new and still learning and i haven't been able to find any solution on my own. Thanks very much for help.
Karolina
(11 rep)
Nov 7, 2022, 09:07 PM
• Last activity: Nov 7, 2022, 11:58 PM
0
votes
1
answers
301
views
zabbix agent install not working on open SUSE 42.3
I am trying to install zabbix-agent on openSUSE 42.3 but it gives me the following error [![view atached image of the error][1]][1] [1]: https://i.sstatic.net/qqQyf.png > Repository 'openSUSE-Leap-42.3-Apache' is invalid. > [openSUSE-Leap-42.3-Apache|http://download.opensuse.org/repositories/Apache/...
I am trying to install zabbix-agent on openSUSE 42.3 but it gives me the following error
> Repository 'openSUSE-Leap-42.3-Apache' is invalid.
> [openSUSE-Leap-42.3-Apache|http://download.opensuse.org/repositories/Apache/openSUSE_Leap_42.3/]
> Valid metadata not found at specified URL Please check if the URIs
> defined for this repository are pointing to a valid repository.
> Warning: Skipping repository 'openSUSE-Leap-42.3-Apache' because of
> the above error. File '/repodata/repomd.xml' not found on medium
> 'http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_Leap_42.3/ '
An idea how to solve this error?

Eljano95
(1 rep)
Jun 28, 2022, 05:37 PM
• Last activity: Jun 28, 2022, 05:42 PM
2
votes
3
answers
1833
views
How convert the output of "ps" and "head" to JSON with key "{#PROCNAME}"?
I'm trying to get a JSON document with the top 5 processes by memory. This JSON I want to send to Zabbix and draw the top 5 processes by memory. I get the top 5 processes by memory by the following command: ps axho comm --sort -rss | head -5 node mongod kubelet dockerd systemd-journal How to convert...
I'm trying to get a JSON document with the top 5 processes by memory.
This JSON I want to send to Zabbix and draw the top 5 processes by memory.
I get the top 5 processes by memory by the following command:
ps axho comm --sort -rss | head -5
node
mongod
kubelet
dockerd
systemd-journal
How to convert the output of
ps
+head
to JSON with key {#PROCNAME}
to get this structure:
{
"data": [
{
"{#PROCNAME}": "node"
},
{
"{#PROCNAME}": "mongod"
},
{
"{#PROCNAME}": "kubelet"
},
{
"{#PROCNAME}": "dockerd"
},
{
"{#PROCNAME}": "systemd-journal"
}
]
}
https://www.zabbix.com/documentation/current/manual/config/macros/lld_macros
There is a type of macro used within the low-level discovery (LLD) function:
{#MACRO}
Anton Patsev
(145 rep)
Feb 26, 2019, 12:52 PM
• Last activity: Jun 17, 2022, 07:25 PM
3
votes
2
answers
4007
views
Zabbix claims that HTTP service is down
I'm configuring Zabbix to monitor our servers. Zabbix is new to me. It is up and running, and monitoring works for some services. One of our Centos servers has http running, so it seems logical to monitor that. I've added the "Template App HTTP Service" to the host. I used all default settings, didn...
I'm configuring Zabbix to monitor our servers. Zabbix is new to me. It is up and running, and monitoring works for some services.
One of our Centos servers has http running, so it seems logical to monitor that. I've added the "Template App HTTP Service" to the host. I used all default settings, didn't change anything. Now Zabbix reports that this service is down. The httpd service is running however, and I can open webpages.
How can I get Zabbix to monitor the HTTP service normally?
SPRBRN
(1125 rep)
Nov 16, 2015, 09:28 AM
• Last activity: Apr 11, 2022, 12:42 PM
0
votes
1
answers
1084
views
How can I save item output in macro in zabbix
how can I save item's output in macro and use it in another item ? i mean reguler item not LLD . for example : I want to get some port app dynamicly and check tcp conection
how can I save item's output in macro and use it in another item ?
i mean reguler item not LLD .
for example : I want to get some port app dynamicly and check tcp conection
Ali
(21 rep)
Jul 8, 2021, 06:23 PM
• Last activity: Sep 5, 2021, 08:01 AM
1
votes
1
answers
2129
views
SNMPv3 traps in Zabbix
My question is about zabbix traps with SNMPv3 and snmptrapd service using **zabbix_trap_receiver.pl**. I have a switch on which I enabled SNMPv3 only, so the switch has no SNMPv1/2c **rw** or **ro** communities configured, and I was able to add it as a host on zabbix after a long journey modifying e...
My question is about zabbix traps with SNMPv3 and snmptrapd service using **zabbix_trap_receiver.pl**. I have a switch on which I enabled SNMPv3 only, so the switch has no SNMPv1/2c **rw** or **ro** communities configured, and I was able to add it as a host on zabbix after a long journey modifying existing SNMPv2 templates. In zabbix documentation in **snmptrapd.conf** there is a couple of lines added as shown here to enable SNMP traps:
authCommunity execute public
perl do "/usr/bin/zabbix_trap_receiver.pl";
My questions:
- What is the meaning of
authCommunity execute public
- I don't have **public** community configured, will snmptrapd service be able to decrypt SNMPv3 traps because on wireshark I had to define SNMPv3 credentials for it to be able to show me traps packets content?
- If not, how can I configure it in **snmptrapd.conf** so that the perl script can read these traps from SNMPv3?
- On wireshark, why does it say SNMPv2c trap, although it is encrypted as SNMPv3, I am lost here?
- Please explain to me how traps work in when SNMPv2 isenabled and when SNMPv3 is enabled?
**Edit**
I also tried the following
createUser -e SHA AES
authUser log,execute
perl do "/usr/bin/zabbix_trap_receiver.pl";
But no luck
elekgeek
(76 rep)
Nov 25, 2019, 01:02 PM
• Last activity: Jan 6, 2021, 09:26 AM
0
votes
1
answers
11311
views
docker Failed to get D-Bus connection: Operation not permitted
I am facing this error with this Dockerfile: FROM centos:latest ENV container docker MAINTAINER The CentOS Project RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm...
I am facing this error with this Dockerfile:
FROM centos:latest
ENV container docker
MAINTAINER The CentOS Project
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
RUN rpm -U https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
RUN yum -y install zabbix-agent
RUN yum clean all
COPY ./zbx-speedtest.sh /etc/zabbix/bin/zbx-speedtest.sh
RUN chmod +x /etc/zabbix/bin/zbx-speedtest.sh
COPY ./speedtest.conf /etc/zabbix/zabbix_agentd.d/speedtest.conf
COPY ./zabbix-speedtest.service /etc/systemd/system/zabbix-speedtest.service
COPY ./zabbix-speedtest.timer /etc/systemd/system/zabbix-speedtest.timer
RUN systemctl enable zabbix-speedtest.timer
RUN systemctl enable zabbix-agent.service
RUN systemctl start zabbix-agent.service
RUN systemctl start zabbix-speedtest.timer
CMD ["/usr/sbin/init"]
When trying to use either
docker-compose
or docker build
I receive this error:
Failed to get D-Bus connection: Operation not permitted
ERROR: Service 'zbx' failed to build: The command '/bin/sh -c systemctl start zabbix-agent.service' returned a non-zero code: 1
I looked everywhere, nothing is up for a solution. If it is impossible to do that with docker, please tell me which container to learn that can do that?
zabbix-speedtest.timer
[Unit]
Description=Run a speedtest every 5 minutes
[Timer]
OnCalendar=*:0/5
# RandomizedDelaySec=30
[Install]
WantedBy=timers.target
zabbix-speedtest.service
[Unit]
Description=Run a speedtest
After=network.target
[Service]
Type=simple
#User=zabbix-agent
#User=root
User=zabbix
ExecStart=/etc/zabbix/bin/zbx-speedtest.sh --run
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=80
[Install]
WantedBy=multi-user.target
elekgeek
(76 rep)
Jul 2, 2020, 04:24 PM
• Last activity: Jul 4, 2020, 02:22 PM
0
votes
1
answers
4906
views
Unable to install Zabbix server
I just installed Zabbix-5.0 LTS on RHEL-8 OS. After logging in on the Zabbix fronend, I get message that "Zabbix server is not running:the information displayed may not be correct". Kindly help me with server installation. My Zabbix server port is 10051. On entering `service zabbix start`, I get out...
I just installed Zabbix-5.0 LTS on RHEL-8 OS. After logging in on the Zabbix fronend, I get message that "Zabbix server is not running:the information displayed may not be correct". Kindly help me with server installation.
My Zabbix server port is 10051.
On entering
service zabbix start
, I get output:
Redirecting to /bin/systemctl start zabbix.service
Failed to start zabbix.service:Unit zabbix.service not found.
and on entering systemctl restart zabbix-server zabbix-agent httpd php-fpm
I get:
Job for zabbix-server.service failed because the control process exited with error code.
See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
Output of "journalctl -xe":
RHEL8 platform-python: SELinux is preventing zabbix_server from using the dac_override capability.
*** Plugin dac_overrride (91.4 confidence) suggests ************************
If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do
Turn on full auditing
#auditctl -w /etc/shadow -p w
Try to recreate AVC.Then execute
#ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla
*** Plugin catchall (9.59 confidence) suggests *************************
If you believe that zabbix_server should have the dac_override capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
#ausearch -c 'zabbix_server' --raw | audit2allow -M my-zabbixserver
#semodule -X 300 -i my-zabbixserver.pp
RHEL8 dbus-daemon: [system] Activating service name='org.fedoraproject.Setroubleshootd' requested by ':1.40' (uid=0 pid=748 comm="/usr/sbin/sedispatch " label="sytem_u:system_r:auditd_t:s0") (using servicehelper)
On entering "systemctl status zabbix-server.service", I get output:
zabbix-server.service-Zabbix server: Loaded:....
Active:....
Process: 4959
ExecStart=/usr/sbin/zabbix_server -c $CONFILE (code=exited,status=1/FAILURE)
RHEL8 systemd:zabbix-server.service:Control process exited,code=exited status=1
RHEL8 systemd:zabbix-server.service:Failed with result 'exit-code'.
RHEL8 systemd:Failed to start Zabbix Server. What do I do now?
BABUPINKY
(7 rep)
Jun 2, 2020, 10:08 PM
• Last activity: Jun 4, 2020, 11:41 PM
1
votes
1
answers
1125
views
sudo asks for password on some servers
I have some sudo rules setup for many (virtual) servers (mostly debian) to be used by zabbix scripts: zabbix ALL=NOPASSWD: /etc/init.d/exim4 restart The zabbix-agent and sudo configuration file (`/etc/sudoers.d/zabbix-agent`) is distributed via ansible, and is the same for all servers. However, on s...
I have some sudo rules setup for many (virtual) servers (mostly debian) to be used by zabbix scripts:
zabbix ALL=NOPASSWD: /etc/init.d/exim4 restart
The zabbix-agent and sudo configuration file (
/etc/sudoers.d/zabbix-agent
) is distributed via ansible, and is the same for all servers.
However, on some servers, sudo asks for a password. On others, it does not. It is the same whether I run the command using zabbix, or locally:
# sudo -u zabbix sudo /etc/init.d/exim4 restart
Sometimes, it works and sometimes it asks for the password.
I looked into it, and the obvious answer that there is a different rule for the zabbix user in the sudo config is not true.
What other factors could result in the system asking for a password anyway?
P.Péter
(525 rep)
Apr 15, 2020, 03:46 PM
Showing page 1 of 20 total questions