Unsupported item key zabbix agent windows

Print Friendly, PDF & Email

Задача:

Исправить ошибку мониторинга заббикс: Not supported – Unsupported item key

—————————————————————

В статье “Мониторинг скорости интернет канала в Zabbix” я настраивал мониторинг пропускной способности интернет канала. Сегодня заметил, что мониторинг показывает ошибку

Если открыть “Configuration > Hosts”, видно что агент активен.

Открывает “Items” заббикс сервера, где был реализовал мониторинг скорости интернета

Авторизуемся на сервере по SSH и проверяем логи агента:

[root@appliance zabbix]# cat /var/log/zabbix/zabbix_agentd.log
  3303:20210411:094314.602 Got signal [signal:15(SIGTERM),sender_pid:92074,sender_uid:996,reason:0]. Exiting ...
  3303:20210411:094314.603 Zabbix Agent stopped. Zabbix 5.2.6 (revision 798506596c).
 92078:20210411:094314.614 Starting Zabbix Agent [Zabbix server]. Zabbix 5.2.6 (revision 798506596c).
 92078:20210411:094314.614 **** Enabled features ****
 92078:20210411:094314.614 IPv6 support:          YES
 92078:20210411:094314.614 TLS support:           YES
 92078:20210411:094314.614 **************************
 92078:20210411:094314.614 using configuration file: /etc/zabbix/zabbix_agentd.conf
 92078:20210411:094314.614 agent #0 started [main process]
 92079:20210411:094314.614 agent #1 started [collector]
 92080:20210411:094314.615 agent #2 started [listener #1]
 92083:20210411:094314.615 agent #5 started [active checks #1]
 92081:20210411:094314.616 agent #3 started [listener #2]
 92082:20210411:094314.616 agent #4 started [listener #3]
 92078:20210411:110518.728 Got signal [signal:15(SIGTERM),sender_pid:92781,sender_uid:996,reason:0]. Exiting ...
 92078:20210411:110518.730 Zabbix Agent stopped. Zabbix 5.2.6 (revision 798506596c).
  1072:20210411:110534.603 Starting Zabbix Agent [Zabbix server]. Zabbix 5.2.6 (revision 798506596c).
  1072:20210411:110534.604 **** Enabled features ****
  1072:20210411:110534.604 IPv6 support:          YES
  1072:20210411:110534.604 TLS support:           YES
  1072:20210411:110534.604 **************************
  1072:20210411:110534.604 using configuration file: /etc/zabbix/zabbix_agentd.conf
  1072:20210411:110534.604 agent #0 started [main process]
  1074:20210411:110534.605 agent #2 started [listener #1]
  1073:20210411:110534.605 agent #1 started [collector]
  1075:20210411:110534.606 agent #3 started [listener #2]
  1077:20210411:110534.606 agent #5 started [active checks #1]
  1076:20210411:110534.609 agent #4 started [listener #3]
  1077:20210411:110534.609 active check configuration update from [127.0.0.1:10051] started to fail (cannot connect to [[127.0.0.1]:10051]: [111] Connection refused)
  1077:20210411:110634.619 active check configuration update from [127.0.0.1:10051] is working again
zabbix_agentd [1688]: Is this process already running? Could not lock PID file [/var/run/zabbix/zabbix_agentd.pid]: [11] Resource temporarily unavailable
[root@appliance zabbix]#

Из логов видно, что порт TCP 10051 не доступен и пид процесса не может залочить так как уже он существует. С помощью netstat проверяем активные соединения на сервере

[root@appliance zabbix]# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1144/nginx: master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1052/sshd
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      1083/zabbix_agentd
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      1247/zabbix_server
tcp6       0      0 :::3306                 :::*                    LISTEN      1143/mysqld
tcp6       0      0 :::22                   :::*                    LISTEN      1052/sshd
tcp6       0      0 :::3000                 :::*                    LISTEN      1244/grafana-server
tcp6       0      0 :::10050                :::*                    LISTEN      1083/zabbix_agentd
tcp6       0      0 :::10051                :::*                    LISTEN      1247/zabbix_server
tcp6       0      0 :::33060                :::*                    LISTEN      1143/mysqld
tcp6       0      0 127.0.0.1:10052         :::*                    LISTEN      1063/java
udp        0      0 0.0.0.0:68              0.0.0.0:*                           989/dhclient
udp        0      0 127.0.0.1:323           0.0.0.0:*                           774/chronyd
udp6       0      0 ::1:323                 :::*                                774/chronyd
[root@appliance zabbix]#

Если netstat не установлен, можно установить следующей командой

yum install net-tools -y

Проверяем содержимое конфига агента заббикс

[root@appliance zabbix]# grep -v '^#' /etc/zabbix/zabbix_agentd.conf | grep -v '^$'
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
AllowKey=system.run[*]
DenyKey=*
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UserParameter=upload[*],cat /tmp/speedtest.txt | grep Upload | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
UserParameter=download[*],cat /tmp/speedtest.txt | grep Download | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
[root@appliance zabbix]#

Пояснения параметров команды grep

^ обозначаем начало строки
# ищем символ комментирования, следующий за началом строки
| передаём вывода первой команды на обработку второй
$ обозначаем конец строки

Есть способ уложить всё в одну команду, использую команду egrep

[root@appliance zabbix]# egrep -v '^#|^$' zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
AllowKey=system.run[*]
DenyKey=*
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UserParameter=upload[*],cat /tmp/speedtest.txt | grep Upload | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
UserParameter=download[*],cat /tmp/speedtest.txt | grep Download | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
[root@appliance zabbix]#

Проверяем работу агента при помощи zabbix_get

[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k upload
ZBX_NOTSUPPORTED: Unsupported item key.
[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k download
ZBX_NOTSUPPORTED: Unsupported item key.
[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k agent.hostname
ZBX_NOTSUPPORTED: Unsupported item key.
[root@appliance zabbix]#

На всякий случай проверяем версию агента

[root@appliance ~]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 5.2.6
Revision 798506596c 29 March 2021, compilation time: Mar 29 2021 14:43:28

Copyright (C) 2021 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.1.1g FIPS  21 Apr 2020
Running with OpenSSL 1.1.1g FIPS  21 Apr 2020
[root@appliance ~]#

До Zabbix версии 5.0.2, в конфигурационном файле агента, для ограничения проверок, требовалось указывать EnableRemoteCommands=1. Начиная с Zabbix 5.0.2 этот параметр признан устаревшим, а для агента версии 2 не поддерживаемым.

В наем случаем ошибки возникли после написания статьи “Мониторинг срока действия сертификата веб-сайта в zabbix” в которой мы активировали два параметра

### Option: AllowKey
#       Allow execution of item keys matching pattern.
#       Multiple keys matching rules may be defined in combination with DenyKey.
#       Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments.
#       Parameters are processed one by one according their appearance order.
#       If no AllowKey or DenyKey rules defined, all keys are allowed.
#
# Mandatory: no
AllowKey=system.run[*]

### Option: DenyKey
#       Deny execution of items keys matching pattern.
#       Multiple keys matching rules may be defined in combination with AllowKey.
#       Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments.
#       Parameters are processed one by one according their appearance order.
#       If no AllowKey or DenyKey rules defined, all keys are allowed.
#       Unless another system.run[*] rule is specified DenyKey=system.run[*] is added by default.
#
# Mandatory: no
# Default:
# DenyKey=system.run[*]
DenyKey=*

Комментируем параметры AllowKey и DenyKey и перезапускаем агента zabbix и проверяем снова при помощи zabbix_get

[root@appliance zabbix]# systemctl restart zabbix-agent
[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k download
67.32
[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k upload
29.57
[root@appliance zabbix]# zabbix_get -s 127.0.0.1 -p10050 -k agent.hostname
Zabbix server
[root@appliance zabbix]# 

Для решения проблемы я изменил конфигурационный файл агента и перезапустил службу

[root@appliance zabbix]# egrep -v '^#|^$'  /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
DenyKey=vfs.file.contents[*passwd*]
AllowKey=system.run[*]
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UserParameter=osbsd.upload[*],cat /tmp/speedtest.txt | grep Upload | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
UserParameter=osbsd.download[*],cat /tmp/speedtest.txt | grep Download | sed 's/ //g' |  cut -d ':' -f2 | grep -o '^[^M]*'
[root@appliance zabbix]# systemctl restart zabbix-agent
[root@appliance zabbix]#

Другие статьи

Not Supported метрика в Zabbix.

Всем привет.

При работе в Zabbix для метрики(item) можно легко получить статус «Unsupported item key.» Самое простое объяснение это когда я ошибаюсь с типом метрики — ее значение текстовое, а я выставил число. И наоборот. Но бывают и варианты.

Вариант 1.
Решил я промониторить температуру ЦП через внешнюю команду в агенте Zabbix:
UserParameter=Temperature.CPU[*], C:\Zabbix\CPUtemp.bat

CPUtemp.bat:
for /F «usebackq tokens=7-10» %%a in (`D:\Toolkit\OpenHardwareMonitor\OpenHardwareMonitorReport.exe`) do echo %%b %%c %%d| find «/intelcpu/0/load/0»>nul && set temper0=%%a
echo %temper0%

Ручной контроль параметра:
c:\zabbix\zabbix_agentd.exe —config c:\zabbix\zabbix_agentd.win.conf —print | findstr Temperature

Однако вчера я обратил внимание, что при запуске батника из командной строки, вывод данных происходит с приличной задержкой в 3-5 секунд. В Zabbix по-умолчанию стоит параметр, по которому агент ожидает ответа от скрипта 3 секунды и на сервере есть подобный параметр, по которому сервер ждет ответа от агента 3 секунды. Если за это время данные не поступают, то Item переходит в статус «Not Supported» и данные с него не собираются.

Чтобы избавиться от этой ошибки, необходимо увеличить таймаут не менее 15-ти секунд. Меняем параметр в конфиге на клиентах и на сервере. У меня он и там и там один и тот же, на максимум:

Timeout=30

И 2-й вариант.

Для тех кто столкнулся с похожей ошибкой при работе с параметром:
Temperature [m|ZBX_NOTSUPPORTED] [Unsupported item key.]
совет будет другим.

Найдите в конфиге агента параметр «UnsafeUserParameters», он обычно закоментирован и по дефолту равен 0. Уберите знак комментария и установите ему значение 1:
UnsafeUserParameters=1

Это потому что символы \ ‘ » ` * ? [ ] { } ~ $ ! & ; ( ) | # @ изначально не позволены в «UserParameter», а значение «1» снимет это ограничение.

Возможно будут еще варианты.
Успехов.

Популярное

  •        Как то получил я от Яндекс.вебмастера сообщение что мой сайт nyukers.ucoz.net содержит вредоносн ы й код. К сожалению, в сообщении…

  • Всем привет. В прошлом году я вам показывал фокус с защитой листа в MS Excel 2010. Но как оказалось в великом и могучем MS Excel сюр…

  • Всем привет. В связи с участившимися требованиями удаленной работы захотелось мне проанализировать какой из штатных инструментов удаленного …

  • Всем привет. Не секрет что б локирование ответов пинг в ОС может предотвратить атаки флуда ICMP пакетов, но в тоже время большинство сис…

  • Всем привет. Набор компонентов RSAT (Remote Server Administration Tools/Средства удаленного администрирования сервера) позволяет удаленно у…

Аватара пользователя

Артём Мамзиков

Admin
Сообщения: 787
Стаж: 4 года 7 месяцев
Откуда: Вологодская область
Поблагодарили: 29 раз
Контактная информация:

Не получается запустить скрипт для выполнения задания в планировщике Windows 10

Сообщение

Артём Мамзиков »

Луиджи Малербо, Добрый день!

В конфигурации Заббикс Агента
Нужно раскомментировать строку EnableRemoteCommands = 1, иначе агент не сможет принимать команды.

начиная с Zabbix 5.0 system.run
Параметр EnableRemoteCommands теперь устарел.
Удаленные команды по-прежнему отключены по умолчанию, но в новых конфигурационных файлах, которые выражаются с помощью нового параметра DenyKey (DenyKey=system.run[*]) черный список,
разрешить все AllowKey=system.run[*].
Удаленные команды можно включить, удалив (или закомментировав) ключ DenyKey=system.run[*]

# — Это комментарий отключает данную настройку (данная строка не используется)

Что вам нужно сделать
#DenyKey=system.run[*]
AllowKey=system.run[*]

После перезапускаете службу заббикс агента

Возможно еще нет доступа от имени пользователя которого работает заббикс агент до планировщика событий (не хватает прав)

количество слов: 24

Аватара пользователя

MrPrayMarh

Гость
Сообщения: 4
Стаж: 10 месяцев

Не получается запустить скрипт для выполнения задания в планировщике Windows 10

Сообщение

MrPrayMarh »

К вопросу запуска скрипта у меня ошибка на агенте:

[15219]: FAILED SU (to zimbra) zabbix on none
[15334]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
[15334]: pam_succeed_if(su-l:auth): requirement «uid >= 1000» not met by user «zimbra»
[15334]: FAILED SU (to zimbra) zabbix on none
[15484]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
[15484]: pam_succeed_if(su-l:auth): requirement «uid >= 1000» not met by user «zimbra»
[15484]: FAILED SU (to zimbra) zabbix on none
[15569]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
[15569]: pam_succeed_if(su-l:auth): requirement «uid >= 1000» not met by user «zimbra»
[15569]: FAILED SU (to zimbra) zabbix on none

Подскажите в какую сторону смотреть??

количество слов: 116

Аватара пользователя

MrPrayMarh

Гость
Сообщения: 4
Стаж: 10 месяцев

Не получается запустить скрипт для выполнения задания в планировщике Windows 10

Сообщение

MrPrayMarh »

Артём Мамзиков писал(а): ↑Ср ноя 23, 2022 08:20
MrPrayMarh, Агент запустить под пользователем root , либо выдать соответствующие права пользователю заббикс. Команду su прописать с — что бы все переменные подтянулись su- zimbra .

Код: Выделить всё

 19551:20221122:140813.012 Starting Zabbix Agent [Zimbra]. Zabbix 5.0.10 (revision 7c3f43904c).
 19551:20221122:140813.012 **** Enabled features ****
 19551:20221122:140813.012 IPv6 support:          YES
 19551:20221122:140813.012 TLS support:           YES
 19551:20221122:140813.012 **************************
 19551:20221122:140813.012 using configuration file: /etc/zabbix/zabbix_agentd.conf
 19551:20221122:140813.012 agent #0 started [main process]
 19552:20221122:140813.013 agent #1 started [collector]
 19553:20221122:140813.013 agent #2 started [listener #1]
 19554:20221122:140813.014 agent #3 started [listener #2]
 19556:20221122:140813.014 agent #5 started [active checks #1]
 19555:20221122:140813.018 agent #4 started [listener #3]
 19553:20221122:141306.180 Failed to execute command "su - zimbra -c "zmclamdctl status"": Timeout while executing a shell script.
 19555:20221122:141307.792 Failed to execute command "su - zimbra -c "mailq"|grep Request |awk '{print $5}'": Timeout while executing a shell script.
 19554:20221122:141308.385 Failed to execute command "su - zimbra -c "zmlogswatchctl status"": Timeout while executing a shell script.
 19555:20221122:141311.389 Failed to execute command "su - zimbra -c "zmproxyctl status"": Timeout while executing a shell script.
 19553:20221122:141312.615 Failed to execute command "su - zimbra -c "zmsaslauthdctl status"": Timeout while executing a shell script.
 19554:20221122:141312.745 Failed to execute command "su - zimbra -c "zmspellctl status"": Timeout while executing a shell script.
 19555:20221122:141404.051 Failed to execute command "su - zimbra -c "zmapachectl status"": Timeout while executing a shell script.
 19553:20221122:141405.556 Failed to execute command "su - zimbra -c "zmauditswatchctl status"": Timeout while executing a shell script.
 19553:20221122:141459.129 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmcontrol status"| grep -v ^Host| sed -e 's/^\t*//g'": Timeout while executing a shell script.
 19553:20221122:141601.036 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmstatctl status"": Timeout while executing a shell script.
 19555:20221122:141814.111 Failed to execute command "su - zimbra -c "zmstorectl status"": Timeout while executing a shell script.
 19554:20221122:141815.184 Failed to execute command "su - zimbra -c "zmswatchctl status"": Timeout while executing a shell script.
 19554:20221122:141857.868 Failed to execute command "su - zimbra -c "mailq"|grep Request |awk '{print $5}'": Timeout while executing a shell script.
 19555:20221122:141859.002 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmcontrol status"| grep -v ^Host| sed -e 's/^\t*//g'": Timeout while executing a shell script.
 19554:20221122:141900.870 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmstatctl status"": Timeout while executing a shell script.
 19553:20221122:141905.294 Failed to execute command "su - zimbra -c "zmauditswatchctl status"": Timeout while executing a shell script.
 19555:20221122:141906.474 Failed to execute command "su - zimbra -c "zmclamdctl status"": Timeout while executing a shell script.
 19554:20221122:141908.045 Failed to execute command "su - zimbra -c "zmlogswatchctl status"": Timeout while executing a shell script.
 19553:20221122:141910.701 Failed to execute command "su - zimbra -c "zmproxyctl status"": Timeout while executing a shell script.
 19554:20221122:141911.851 Failed to execute command "su - zimbra -c "zmsaslauthdctl status"": Timeout while executing a shell script.
 19555:20221122:141913.012 Failed to execute command "su - zimbra -c "zmspellctl status"": Timeout while executing a shell script.
 19553:20221122:141913.702 Failed to execute command "su - zimbra -c "zmstorectl status"": Timeout while executing a shell script.
 19553:20221122:142503.706 Failed to execute command "su - zimbra -c "zmapachectl status"": Timeout while executing a shell script.
 19555:20221122:142514.717 Failed to execute command "su - zimbra -c "zmswatchctl status"": Timeout while executing a shell script.
 19555:20221122:142900.850 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmstatctl status"": Timeout while executing a shell script.
 19554:20221122:142905.167 Failed to execute command "su - zimbra -c "zmauditswatchctl status"": Timeout while executing a shell script.
 19553:20221122:142906.324 Failed to execute command "su - zimbra -c "zmclamdctl status"": Timeout while executing a shell script.
 19555:20221122:142908.179 Failed to execute command "su - zimbra -c "zmlogswatchctl status"": Timeout while executing a shell script.
 19553:20221122:142911.140 Failed to execute command "su - zimbra -c "zmproxyctl status"": Timeout while executing a shell script.
 19555:20221122:142911.727 Failed to execute command "su - zimbra -c "zmsaslauthdctl status"": Timeout while executing a shell script.
 19554:20221122:142912.927 Failed to execute command "su - zimbra -c "zmspellctl status"": Timeout while executing a shell script.
 19553:20221122:142914.148 Failed to execute command "su - zimbra -c "zmstorectl status"": Timeout while executing a shell script.
 19555:20221122:142914.729 Failed to execute command "su - zimbra -c "zmswatchctl status"": Timeout while executing a shell script.
 19554:20221122:142958.274 Failed to execute command "su - zimbra -c "mailq"|grep Request |awk '{print $5}'": Timeout while executing a shell script.
 19555:20221122:142959.290 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmcontrol status"| grep -v ^Host| sed -e 's/^\t*//g'": Timeout while executing a shell script.
 19553:20221122:143104.013 Failed to execute command "su - zimbra -c "zmapachectl status"": Timeout while executing a shell script.
 19556:20221122:143613.547 no active checks on server [1**.***.**.**:10051]: host [Zimbra] not found
 19556:20221122:143813.635 no active checks on server [1**.***.**.**:10051]: host [Zimbra] not found
 19555:20221122:144701.660 Failed to execute command "su - zimbra -c "/opt/zimbra/bin/zmstatctl status"": Timeout while executing a shell script.
 19554:20221122:144811.867 Failed to execute command "su - zimbra -c "zmsaslauthdctl status"": Timeout while executing a shell script.

Агент под рутом запущен, выше это логи агента с зимбры, если посмотреть статус службы агента на почтовике то видим:

Код: Выделить всё

● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-11-23 16:26:48 +10; 10min ago
  Process: 26149 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 26285 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 26287 (zabbix_agentd)
   CGroup: /system.slice/zabbix-agent.service
           ├─26287 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
           ├─26288 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
           ├─26289 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
           ├─26290 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
           ├─26291 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
           └─26292 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

Nov 23 16:35:29 *** su[28838]: FAILED SU (to zimbra) zabbix on none
Nov 23 16:35:38 *** su[28872]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
Nov 23 16:35:38 *** su[28872]: pam_succeed_if(su-l:auth): requirement "uid >= 1000" not met by user "zimbra"
Nov 23 16:35:40 *** su[28872]: FAILED SU (to zimbra) zabbix on none
Nov 23 16:36:28 *** su[29077]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
Nov 23 16:36:28 *** su[29077]: pam_succeed_if(su-l:auth): requirement "uid >= 1000" not met by user "zimbra"
Nov 23 16:36:29 *** su[29077]: FAILED SU (to zimbra) zabbix on none
Nov 23 16:37:28 *** su[29319]: pam_unix(su-l:auth): auth could not identify password for [zimbra]
Nov 23 16:37:28 *** su[29319]: pam_succeed_if(su-l:auth): requirement "uid >= 1000" not met by user "zimbra"
Nov 23 16:37:30 *** su[29319]: FAILED SU (to zimbra) zabbix on none

количество слов: 1228

Аватара пользователя

MrPrayMarh

Гость
Сообщения: 4
Стаж: 10 месяцев

Не получается запустить скрипт для выполнения задания в планировщике Windows 10

Сообщение

MrPrayMarh »

Артём Мамзиков писал(а): ↑Ср ноя 23, 2022 10:22
MrPrayMarh, если вручную выполнить команду из под root
su — zimbra -c «zmclamdctl status» она выполняется ? И как быстро она выполняется?
И почему то пишет что ей нужен пароль от пользователя zimbra если он задан необходимо добавить переменную с паролем в команды.

Вручную команда выполняется, не сказать что быстро, но выполняется. Пароль для пользователя zimbra задан. Т.е. в шаблоне помимо $USER_ZIMBRA нужно ввести $PASS_ZIMBRA ?

количество слов: 17

Аватара пользователя

Артём Мамзиков

Admin
Сообщения: 787
Стаж: 4 года 7 месяцев
Откуда: Вологодская область
Поблагодарили: 29 раз
Контактная информация:

Не получается запустить скрипт для выполнения задания в планировщике Windows 10

Сообщение

Артём Мамзиков »

MrPrayMarh, да все верно , если есть пароль добавляй везде в скрипте переменную пароля , так же в элементах в шаблоне где используется аналогичная команда , добавь макросом.

Время ожидания выполнения команды максимум 30 секунд задается в конфиге заббикс сервера. По умолчанию вроде 10 секунд. Если команда выполняется дольше 30 можно сделать траппером. В некоторых случаях получаются рваные график. И ложные срабатывания триггеров если команда выполняется более 30 секунд сказывается на весь узел всле элементы типа заббикс агент.

количество слов: 5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Closed

astatinede opened this issue

Nov 15, 2016

· 5 comments

Comments

@astatinede

Hallo,
first thank you very much for the super template.

I have followed the guide and all the files installed.
But when i tried to test the command » zabbix_get -s 127.0.0.1 -k «custom.vfs.discover_disks»»,
i got

ZBX_NOTSUPPORTED: Unsupported item key.

Would you please tell me how to solve the problem?
My Sever is running debian and zabbix 2.4. Just upgraded from 2.2
Thanks.

@grundic

Hello, @astatinede!

I would recommend checking the correctness of installation of userparameter_diskstats.conf. Did you put it to the correct directory?
If you’re sure that you did, then have you restarted Zabbix after that? Also you can try to inspect logs at /var/logs/zabbix or something like that.

@astatinede

Thank you for your feedback.
I checked again, the userparameter_diskstats.conf file is under the new created /etc/zabbix/zabbix_agentd.d.
I also found another default path /etc/zabbix/zabbix_agentd.conf.d I did move the conf file to this path and tested again. Still get notsupported.

Below is the output from zabbix_server.log after restart. Seems everthing good.
Would you please tell me how can I check if zabbix server has loaded the userparameter_diskstats.conf successfully? Or how can I configure Zabbix enforce to load the conf?

8069:20161117:083249.509 Starting Zabbix Server. Zabbix 2.4.8 (revision 59539).
8069:20161117:083249.509 ****** Enabled features ******
8069:20161117:083249.509 SNMP monitoring: YES
8069:20161117:083249.509 IPMI monitoring: NO
8069:20161117:083249.509 WEB monitoring: YES
8069:20161117:083249.509 VMware monitoring: YES
8069:20161117:083249.509 Jabber notifications: NO
8069:20161117:083249.509 Ez Texting notifications: YES
8069:20161117:083249.509 ODBC: NO
8069:20161117:083249.509 SSH2 support: NO
8069:20161117:083249.509 IPv6 support: YES
8069:20161117:083249.509 ******************************
8069:20161117:083249.509 using configuration file: /usr/local/etc/zabbix_server.conf
8069:20161117:083249.517 current database version (mandatory/optional): 02040000/02040000
8069:20161117:083249.517 required mandatory version: 02040000
8069:20161117:083249.550 server #0 started [main process]
8071:20161117:083249.551 server #1 started [configuration syncer #1]
8072:20161117:083249.551 server #2 started [db watchdog #1]
8073:20161117:083249.551 server #3 started [poller #1]
8074:20161117:083249.552 server #4 started [poller #2]
8075:20161117:083249.552 server #5 started [poller #3]
8076:20161117:083249.553 server #6 started [poller #4]
8077:20161117:083249.553 server #7 started [poller #5]
8078:20161117:083249.553 server #8 started [unreachable poller #1]
8079:20161117:083249.554 server #9 started [trapper #1]
8080:20161117:083249.554 server #10 started [trapper #2]
8081:20161117:083249.554 server #11 started [trapper #3]
8083:20161117:083249.555 server #13 started [trapper #5]
8085:20161117:083249.556 server #15 started [alerter #1]
8086:20161117:083249.556 server #16 started [housekeeper #1]
8087:20161117:083249.556 server #17 started [timer #1]
8088:20161117:083249.557 server #18 started [http poller #1]
8082:20161117:083249.560 server #12 started [trapper #4]
8094:20161117:083249.560 server #24 started [escalator #1]
8093:20161117:083249.562 server #23 started [history syncer #4]
8090:20161117:083249.566 server #20 started [history syncer #1]
8084:20161117:083249.566 server #14 started [icmp pinger #1]
8095:20161117:083249.567 server #25 started [proxy poller #1]
8096:20161117:083249.567 server #26 started [self-monitoring #1]
8091:20161117:083249.567 server #21 started [history syncer #2]
8092:20161117:083249.568 server #22 started [history syncer #3]
8089:20161117:083249.571 server #19 started [discoverer #1]

@astatinede

Ha, problem solved.
I added Include=/etc/zabbix/zabbix_agentd.d/ in zabbix_agentd.conf and restarted zabbix_agentd

Thanks for the tipps.

@grundic

I was just going to ask you to check this configuration file.
Glad it worked!

@AndrStnz

Just wanted to add

The Include Option in /etc/zabbix/zabbix_agentd.conf hast to be:

Include=/etc/zabbix/zabbix_agentd.d/

not

Include=/etc/zabbix/zabbix_agentd.d/*.conf

Theoretically they should both work, but sadly didnt.

During ZABBIX monitoring, you will be prompted: Unsupported item key, which generally has the following reasons.

1. Sometimes user-defined scripts are used for monitoring. After zabix-agentd.conf is modified, it is not restarted, so an error will be reported
solution: restart ZABBIX agent

service zabbix-agent restart

2. Check whether your monitoring window is open

When using ZABBIX to monitor the server, the ZABBIX agent communicates with the ZABBIX server through port 10050. The server listens on port 10051 and the client listens on port 10050, so we need to expose the port. Sometimes, the server does not open port 10050, resulting in an error.

netstat -lntup

3. If the firewall is not closed, you need to check whether the port of the firewall and the security group on the cloud service allow the port to be opened to the outside world

4. If it is a self-defined monitoring item, you need to check whether to add the corresponding value in the configuration file of ZABBIX agent

For example, the corresponding script information, otherwise the data cannot be transmitted to the server through the agent

1 UserParameter=ora.tab.discovery,C:\scripts\AutodiscoverTBS.bat
2 UserParameter=tablespace[*],C:\scripts\CheckORATBS.bat $1 $2

5. Zabbix_agentd version compatibility causes the failure of item_key not to support.
It may be that the two port versions are inconsistent due to the upgrade of the client or the server, which may cause errors.
Resolve the version; upgrade the client or server to the same version

6, zabbix_get can get the value, but the item is still Not Supported. If your value type setting is correct, there are the following solutions:

—A. Wait 10 minutes, zabbix will recheck the Supported status of the current item.
—B. Delete the current item and recreate it
—c. Modify the recheck time of zabbix, for example, change it to 10 minutes, click administration—>General—>the ​​drop-down bar on the right and select “other”—>Refresh unsupported items (in sec) Change to 60 (in seconds) —->update.

  • Unsupported graphics card windows 10
  • Unknown lan id ewa windows 10
  • Unsecapp exe что это за процесс windows 7
  • Unknown hard error windows 10 как исправить
  • Unreal engine download for windows