Closed ricain59 closed 4 years ago
Hi error code 1 is zabbix_sender return code. It means, that data sending is failed. https://www.zabbix.com/documentation/4.0/manpages/zabbix_sender
check parameter ServerActive in zabbix_agent configuration file. In this script logging is so-so. In future, i will have changed it.
Hi,
Thank you for help. I've verify my configuration and change. I have read your script (i am not expert on python) and decided try this: [root@logs-rda zabbix]# /usr/bin/zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf -s stor3700 -T -i /tmp/stor3700_1582209454.tmp zabbix_sender [14709]: DEBUG: In zbx_tls_init_child() zabbix_sender [14709]: DEBUG: OpenSSL library (version OpenSSL 1.1.1c FIPS 28 May 2019) initialized zabbix_sender [14709]: DEBUG: zbx_tls_init_child() loaded PSK identity "DSPT PROD RDA logs" zabbix_sender [14709]: DEBUG: zbx_tls_init_child() loaded PSK from file "/etc/zabbix/zabbix_agent.psk" zabbix_sender [14709]: DEBUG: zbx_tls_init_child() PSK ciphersuites: TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-PSK-AES128-CBC-SHA256 ECDHE-PSK-AES128-CBC-SHA PSK-AES128-GCM-SHA256 PSK-AES128-CCM8 PSK-AES128-CCM PSK-AES128-CBC-SHA256 PSK-AES128-CBC-SHA zabbix_sender [14709]: DEBUG: End of zbx_tls_init_child() zabbix_sender [14710]: DEBUG: In zbx_tls_connect(): psk_identity:"DSPT PROD RDA logs" zabbix_sender [14710]: DEBUG: zbx_psk_client_cb() requested PSK identity "DSPT PROD RDA logs" zabbix_sender [14710]: DEBUG: End of zbx_tls_connect():SUCCEED (established TLSv1.3 TLS_CHACHA20_POLY1305_SHA256) zabbix_sender [14710]: DEBUG: answer [{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000033"}] Response from "zabbix.digitalsign.pt:10051": "processed: 0; failed: 1; total: 1; seconds spent: 0.000033" sent: 1; skipped: 0; total: 1
And failed.
the file contain this: stor3700 lsvdisk 1582209450 {"data": [{"{#ID}": "0","{#NAME}": "oVirt-hosts-replica"},{"{#ID}": "1","{#NAME}": "hosted-engine-replica"},{"{#ID}": "2","{#NAME}": "vdisk0"},{"{#ID}": "3","{#NAME}": "vdisk1"},{"{#ID}": "4","{#NAME}": "oVirt-hosts2-replica"},{"{#ID}": "5","{#NAME}": "vdisk2"}]}
The zabbix server reject data... What is the problem? The file have the value correct.
Hi,
I resolve the situation... In my ambient i used a zabbix proxy. I change your template on add this: on your template change the scripts:
on my proxy create a second file conf with hostname is equal value of {$FQDN} and change this on your script: config_path = "/etc/zabbix/zabbix_agentd_stor3700.conf"
because my proxy have a file config agent different, and now works.
Thank you.
And on ip storage, i put ip of my proxy:
for this i have created macro {$FQDN}
Hi,
I've try run script: sudo -u zabbix /etc/zabbix/scripts/storwize_get_state.py '--storwize_ip=10.121.27.10' '--storwize_port=22' '--storwize_user=user' '--storwize_password=password' '--storage_name='storage' '--discovery' and sudo -u zabbix /etc/zabbix/scripts/storwize_get_state.py '--storwize_ip=10.121.27.10' '--storwize_port=22' '--storwize_user=user' '--storwize_password=password' '--storage_name='storage' '--status' But both return value 1.
On zabbix, i've this on latest data:
get discovery | 2020-02-07 14:00:02 | 1 | | get status | 2020-02-07 14:27:03 | 1 | |
But haven't any data.
My system works with zabbix server and zabbix proxy. centos 8 on zabbix server and proxy Python 2.7.16 on zabbix proxy.
On folder /tmp, have this: -rw-rw-r--. 1 zabbix zabbix 97933 Feb 7 14:30 storwize_state.log
With this:
********************************* Starting Get Status ********************************* storage - 2020-02-07 14:29:56,902 - storwize_logger - INFO - Connection Established Successfully storage - 2020-02-07 14:29:57,244 - storwize_logger - INFO - Starting discovering resource - lsmdiskgrp storage - 2020-02-07 14:29:57,245 - storwize_logger - INFO - Succes get resource - lsmdiskgrp storage - 2020-02-07 14:29:57,546 - storwize_logger - INFO - Starting collecting status of resource - lsvdisk storage - 2020-02-07 14:29:57,882 - storwize_logger - INFO - Starting discovering resource - lsenclosure storage - 2020-02-07 14:29:57,882 - storwize_logger - INFO - Succes get resource - lsenclosure storage - 2020-02-07 14:29:58,148 - storwize_logger - INFO - Starting collecting status of resource - lsmdisk storage - 2020-02-07 14:29:58,465 - storwize_logger - INFO - Starting discovering resource - lsenclosurebattery storage - 2020-02-07 14:29:58,466 - storwize_logger - INFO - Succes get resource - lsenclosurebattery storage - 2020-02-07 14:29:58,759 - storwize_logger - INFO - Starting collecting status of resource - lsmdiskgrp storage - 2020-02-07 14:29:59,104 - storwize_logger - INFO - Starting discovering resource - lsenclosurepsu storage - 2020-02-07 14:29:59,104 - storwize_logger - INFO - Succes get resource - lsenclosurepsu storage - 2020-02-07 14:29:59,405 - storwize_logger - INFO - Starting collecting status of resource - lsenclosure storage - 2020-02-07 14:29:59,668 - storwize_logger - INFO - Starting discovering resource - lsenclosurecanister storage - 2020-02-07 14:29:59,669 - storwize_logger - INFO - Succes get resource - lsenclosurecanister storage - 2020-02-07 14:30:00,333 - storwize_logger - INFO - Starting discovering resource - lsdrive storage - 2020-02-07 14:30:00,335 - storwize_logger - INFO - Succes get resource - lsdrive storage - 2020-02-07 14:30:01,135 - storwize_logger - INFO - Starting collecting status of resource - lsenclosurebattery storage - 2020-02-07 14:30:01,154 - storwize_logger - INFO - Starting discovering resource - lsportfc storage - 2020-02-07 14:30:01,154 - storwize_logger - INFO - Succes get resource - lsportfc storage - 2020-02-07 14:30:01,773 - storwize_logger - INFO - Starting collecting status of resource - lsenclosurepsu storage - 2020-02-07 14:30:01,797 - storwize_logger - INFO - Starting discovering resource - lsportsas storage - 2020-02-07 14:30:01,798 - storwize_logger - INFO - Succes get resource - lsportsas storage - 2020-02-07 14:30:01,912 - storwize_logger - INFO - Connection Closed Successfully storage - 2020-02-07 14:30:03,223 - storwize_logger - INFO - Starting collecting status of resource - lsenclosurecanister storage - 2020-02-07 14:30:03,756 - storwize_logger - INFO - Starting collecting status of resource - lsdrive storage - 2020-02-07 14:30:04,299 - storwize_logger - INFO - Starting collecting status of resource - lsportfc storage - 2020-02-07 14:30:04,877 - storwize_logger - INFO - Starting collecting status of resource - lsportsas storage - 2020-02-07 14:30:04,880 - storwize_logger - INFO - Connection Closed Successfully
Can you help me resolve this?