Skip to content

Вместо графика получаем картинку "ERROR: No items defined." #5

@a-zazell

Description

@a-zazell

Симптом: вместо графика получаем картинку с надписью в сабже.
Система:

a-zazell@zabbix:~$ curl -V
curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
a-zazell@zabbix:~$ apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Sep  2 2015 13:02:10
a-zazell@zabbix:~$ uname -a
Linux zabbix 3.16.0-49-generic #65~14.04.1-Ubuntu SMP Wed Sep 9 10:03:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
a-zazell@zabbix:~$ cat /etc/issue
Ubuntu 14.04.3 LTS

Из репозитариев Curl стоял 7.35, грешил на "Hostname was NOT found in DNS cache". Поставил 7.22 - без изменений. Ссылка Curl'ом не возращает график, но в браузере открывает как надо.

В итоге заменил в процедуре get_image curl на wget:

@zabbix:~$ diff /etc/zabbix/alert.d/zbxtg.sh.curl_img_get /etc/zabbix/alert.d/zbxtg.sh
21c21,24
<     ${CURL} -s --cookie ${TMP_COOKIE} --globoff "${URL}" -o ${IMG_NAME}

---
>     #${CURL} -s --cookie ${TMP_COOKIE} --globoff "${URL}" -o ${IMG_NAME}
>     wget -qO- --load-cookies=${TMP_COOKIE} --save-cookies=${TMP_COOKIE} \
>       --keep-session-cookies \
>       "${URL}" > ${IMG_NAME}
76d78
<

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions