Ubuntu 安装 zabbix-get,Command 'zabbix_get' not found 解决办法

背景

在上回 Ubuntu 安装 nginx 版 zabbix 之后,执行 zabbix_get 提示命令不存在:

[root@Ubuntu:zabbix]# zabbix_get -s 127.0.0.1 -k 'nginx.status[ping]'

Command 'zabbix_get' not found, but can be installed with:

apt install zabbix-proxy-mysql  
apt install zabbix-proxy-pgsql  
apt install zabbix-proxy-sqlite3
apt install zabbix-server-mysql 
apt install zabbix-server-pgsql 

解决方法

apt 安装 zabbix-get

[root@Ubuntu:~]# apt install zabbix-get
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  zabbix-get
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 72.7 kB of archives.
After this operation, 249 kB of additional disk space will be used.
ionic [72.7 kB]
Fetched 72.7 kB in 0s (222 kB/s)

Selecting previously unselected package zabbix-get.
(Reading database ... 106406 files and directories currently installed.)
Preparing to unpack .../zabbix-get_1%3a5.0.0~alpha2-1+bionic_amd64.deb ...
Unpacking zabbix-get (1:5.0.0~alpha2-1+bionic) .................................................] 
Setting up zabbix-get (1:5.0.0~alpha2-1+bionic) ...######.......................................] 
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...##############################.............] 

之后就可以愉快地执行 zabbix_get

[root@Ubuntu:zabbix]# zabbix_get -s 127.0.0.1 -k 'php-fpm.status[ping]' 
0
[root@Ubuntu:zabbix]# zabbix_get -s 127.0.0.1 -k 'php-fpm.status[conn]'
15743

切记

安装的是 zabbix-get !而不是 zabbix_get,否则会出现以下情况

[root@Ubuntu:zabbix]# apt install zabbix_get
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package zabbix_get
[root@Ubuntu:zabbix]# which zabbix_get
[root@Ubuntu:zabbix]# 
[root@Ubuntu:zabbix]# zabbix_get -s 127.0.0.1 -k 'nginx.status[ping]'

Command 'zabbix_get' not found, but can be installed with:

apt install zabbix-proxy-mysql  
apt install zabbix-proxy-pgsql  
apt install zabbix-proxy-sqlite3
apt install zabbix-server-mysql 
apt install zabbix-server-pgsql 
Responses
  1. Hello, always i used to check website posts here in the early hours in the morning, because i enjoy to learn more and more.

    Reply
  2. Hi there i am kavin, its my first occasion to commenting anywhere, when i read this piece of writing i thought i could also make comment due to this good post.

    Reply
  3. Thank you a bunch for sharing this with all folks you really understand what you are speaking approximately! Bookmarked. Please additionally visit my site =). We can have a hyperlink alternate arrangement between us!

    Reply
  4. What's up to all, the contents present at this site are in fact awesome for people experience, well, keep up the nice work fellows.

    Reply
  5. Thanks , I've recently been looking for info about this subject for a while and yours is the best I've came upon till now. But, what about the bottom line? Are you certain in regards to the source?

    Reply
  6. I am glad to be a visitor of this utter web site, thank you for this rare info!

    Reply