Zabbix: Difference between revisions

From DWIKI
mNo edit summary
Line 30: Line 30:




=FAQ=


==SNMP==
= FAQ =
===Cannot find host interface on "esxhost" for item key foo===
 
== SNMP ==
 
=== Cannot find host interface on "esxhost" for item key foo ===
 
Might mean you're trying to import an SNMP template before configuring SNMP for the host
Might mean you're trying to import an SNMP template before configuring SNMP for the host


 
== Agent side ping check ==


==Agent side ping check==
  UserParameter=pingtime[*],fping -e $1|sed 's/^.*(\([0-9].*\) ms).*$/\1/g'
  UserParameter=pingtime[*],fping -e $1|sed 's/^.*(\([0-9].*\) ms).*$/\1/g'
  UserParameter=pingalive[*],fping $1|grep -q alive;echo $?
  UserParameter=pingalive[*],fping $1|grep -q alive;echo $?


==IPMI errors==
== IPMI errors ==
===cannot connect to IPMI host: [22] Operation canceled===
 
=== cannot connect to IPMI host: [22] Operation canceled ===
 
Usually temporary because of broken ipmi lib, ignore it
Usually temporary because of broken ipmi lib, ignore it


 


== Filters ==


==Filters==
The regular expressions referred to in discovery are found under Administration->General, and then "Regular expressions" in the dropdown at top right of the page
The regular expressions referred to in discovery are found under Administration->General, and then "Regular expressions" in the dropdown at top right of the page
===cannot connect to IPMI host: [125] Operation canceled===
 
=== cannot connect to IPMI host: [125] Operation canceled ===
 
possibly authentication method issue
possibly authentication method issue


==Discover: value must be a JSON object==
== Discover: value must be a JSON object ==
 
Could mean you need to escape slashes
Could mean you need to escape slashes


 
== Cannot create item: Invalid first parameter ==


==Cannot create item: Invalid first parameter==
Problably a calculated item, try doublequoting the item key:
Problably a calculated item, try doublequoting the item key:
  last("foo[bar]")
  last("foo[bar]")


 


==Install recent zabbix on CentOS/RHEL==
== Install recent zabbix on CentOS/RHEL ==
  rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
 
  rpm -ivh [https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm]
  yum install zabbix-agent
  yum install zabbix-agent


==Discovery data example==
== Discovery data example ==
 
Output of a discovery script should look like:
Output of a discovery script should look like:


Line 73: Line 90:
  ]}
  ]}


==Backing up tables==
== Backing up tables ==
https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script
 
[https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script]
 
== cannot send list of active checks ==


==cannot send list of active checks==
Most likely ServerActive is defined in agent config, while not used at all
Most likely ServerActive is defined in agent config, while not used at all


==Latest 20 issues==
== Latest 20 issues ==
 
DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php
DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php


==Zabbix unreachable poller processes more than 75% busy==
== Zabbix unreachable poller processes more than 75% busy ==
 
Increase '''StartPollersUnreachable'''
Increase '''StartPollersUnreachable'''


==More than 100 items having missing data for more than 10 minutes==
== More than 100 items having missing data for more than 10 minutes ==
 
Could be high load. Also check Administration->Queue
Could be high load. Also check Administration->Queue


==Zabbix escalator processes more than 75% busy==
== Zabbix escalator processes more than 75% busy ==
 
probably high system load overall
probably high system load overall


==Check agent==
== Check agent ==
 
  zabbix_get -s my.host.com -k agent.version
  zabbix_get -s my.host.com -k agent.version


==ZBX_NOTSUPPORTED==
== ZBX_NOTSUPPORTED ==
 
Could be anything, enable logging on agent. It could be version mismatch. Check
Could be anything, enable logging on agent. It could be version mismatch. Check
  zabbix_get -s yourhost -k agent.version
  zabbix_get -s yourhost -k agent.version
If that works, you're calling for an undefined or unsupported key.
If that works, you're calling for an undefined or unsupported key.


==Incorrect trigger expression. Host "xx" does not exist or you have no access to this host.==
== Incorrect trigger expression. Host "xx" does not exist or you have no access to this host. ==
 
Means there's no related item.
Means there's no related item.


==zabbix_get returns nothing==
== zabbix_get returns nothing ==
 
best look at log on agent side
best look at log on agent side


==run playbook on single host==
== run playbook on single host ==
 
  ansible_playbook -l somehost somplay.yml
  ansible_playbook -l somehost somplay.yml


[[:Category:Monitoring]]
[[:Category:Monitoring]]


 
== Zabbix server is not running: the information displayed may not be current ==
Might be selinux: [http://sysads.co.uk/2013/11/zabbix-server-running-alert/ http://sysads.co.uk/2013/11/zabbix-server-running-alert/]


==Zabbix server is not running: the information displayed may not be current==
== vmware.hv.cpu.usage[{$URL},{HOST.HOST}]" became not supported: Couldn't resolve host name ==
Might be selinux: http://sysads.co.uk/2013/11/zabbix-server-running-alert/


==vmware.hv.cpu.usage[{$URL},{HOST.HOST}]" became not supported: Couldn't resolve host name==
  Set macro {$URL} to [https://your.ip/sdk/ https://your.ip/sdk/] (shouldn't discovery figure that out from {$HOST} ?
  Set macro {$URL} to https://your.ip/sdk/ (shouldn't discovery figure that out from {$HOST} ?
 
== unsupported item key ==


==unsupported item key==
This might mean it's expecting a value from the script you're calling.
This might mean it's expecting a value from the script you're calling.
  echo 1
  echo 1


==ansible or API not showing host groups==
== ansible or API not showing host groups ==
 
Permissions!! See Administration->User Groups
Permissions!! See Administration->User Groups


 


==failed to update local proxy configuration copy: invalid field name "items.lastlogsize"==
== failed to update local proxy configuration copy: invalid field name "items.lastlogsize" ==
check everything :)
 
check everything :)
 
== Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] ==


==Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]==
  This probably means the agent returned 1\n1
  This probably means the agent returned 1\n1
==database is down: retrying in 10 seconds==
try upping max_connections
==[Incorrect key file for table 'items'; try to repair it==
Could be something /tmp related

Revision as of 13:45, 21 October 2020

Links

Installing from git

git clone https://github.com/zabbix/zabbix.git
cd zabbix 
./bootstrap.sh


Templates

Mysql template

FAQ

SNMP

Cannot find host interface on "esxhost" for item key foo

Might mean you're trying to import an SNMP template before configuring SNMP for the host

 

Agent side ping check

UserParameter=pingtime[*],fping -e $1|sed 's/^.*(\([0-9].*\) ms).*$/\1/g'
UserParameter=pingalive[*],fping $1|grep -q alive;echo $?

IPMI errors

cannot connect to IPMI host: [22] Operation canceled

Usually temporary because of broken ipmi lib, ignore it

 

Filters

The regular expressions referred to in discovery are found under Administration->General, and then "Regular expressions" in the dropdown at top right of the page

cannot connect to IPMI host: [125] Operation canceled

possibly authentication method issue

Discover: value must be a JSON object

Could mean you need to escape slashes

 

Cannot create item: Invalid first parameter

Problably a calculated item, try doublequoting the item key:

last("foo[bar]")

 

Install recent zabbix on CentOS/RHEL

rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent

Discovery data example

Output of a discovery script should look like:

{"data":[
  {"{#VAR1}":"value11","#{VAR2":"value12"},
  {"{#VAR1}":"value21","#{VAR2":"value22"}
]}

Backing up tables

https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script

cannot send list of active checks

Most likely ServerActive is defined in agent config, while not used at all

Latest 20 issues

DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php

Zabbix unreachable poller processes more than 75% busy

Increase StartPollersUnreachable

More than 100 items having missing data for more than 10 minutes

Could be high load. Also check Administration->Queue

Zabbix escalator processes more than 75% busy

probably high system load overall

Check agent

zabbix_get -s my.host.com -k agent.version

ZBX_NOTSUPPORTED

Could be anything, enable logging on agent. It could be version mismatch. Check

zabbix_get -s yourhost -k agent.version

If that works, you're calling for an undefined or unsupported key.

Incorrect trigger expression. Host "xx" does not exist or you have no access to this host.

Means there's no related item.

zabbix_get returns nothing

best look at log on agent side

run playbook on single host

ansible_playbook -l somehost somplay.yml

Category:Monitoring

 

Zabbix server is not running: the information displayed may not be current

Might be selinux: http://sysads.co.uk/2013/11/zabbix-server-running-alert/

vmware.hv.cpu.usage[{$URL},{HOST.HOST}]" became not supported: Couldn't resolve host name

Set macro {$URL} to https://your.ip/sdk/ (shouldn't discovery figure that out from {$HOST} ?

unsupported item key

This might mean it's expecting a value from the script you're calling.

echo 1

ansible or API not showing host groups

Permissions!! See Administration->User Groups

 

failed to update local proxy configuration copy: invalid field name "items.lastlogsize"

check everything :)

Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

This probably means the agent returned 1\n1


database is down: retrying in 10 seconds

try upping max_connections

[Incorrect key file for table 'items'; try to repair it

Could be something /tmp related