Closed dperi7 closed 3 years ago
Hi, sorry for the long answer.
Probably you don't create user zabbix on your storage or set wrong password in pystormon.conf that not match with password on storage. Also check the permissions for the user zabbix on your storage - it have to be member of group RestrictedAdmin.
With best regards, Denis
Hello Denis and thanks for your answer,
I've made proposed changes on pystormon.conf file and now storage_cim_print.py look to work fine but still not getting any data on zabbix.
User zabbix on IBM storage has been set as administrator. Do I have to configure it as RestrictedAdmin instead?
best regards, Dimitris
Hello Dimitris
You can leave user zabbix in group Administrators, it will work, but it's overpermissions for read only user. It's better to avoid grant all rights to monitoring users.
For view data in Zabbix, check that the name of your storage in devices.conf matches the name of your storage in Zabbix. Also check that Zabbix trappers is running on your Zabbix server or proxy:
# ps aux | grep trapper
zabbix 776389 0.2 0.4 2049416 111772 ? S дек07 63:41 /usr/sbin/zabbix_server: trapper #1 [processed data in 0.000166 sec, waiting for connection]
zabbix 776390 0.2 0.4 2049512 112016 ? S дек07 63:43 /usr/sbin/zabbix_server: trapper #2 [processed data in 0.000342 sec, waiting for connection]
zabbix 776391 0.2 0.4 2049452 112092 ? S дек07 63:12 /usr/sbin/zabbix_server: trapper #3 [processed data in 0.000301 sec, waiting for connection]
zabbix 776392 0.2 0.4 2049600 112064 ? S дек07 63:57 /usr/sbin/zabbix_server: trapper #4 [processed data in 0.000187 sec, waiting for connection]
zabbix 776393 0.2 0.4 2049412 111836 ? S дек07 63:31 /usr/sbin/zabbix_server: trapper #5 [processed data in 0.000176 sec, waiting for connection]
Hello Denis and thanks once more for you reply.
I have checked and verified that storage name is the same at devices.conf file and in zabbix. Also trappers are tested and running on proxy without problem. However still not getting any metrics.
Can you please clarify for me the following: 1.Should the proxy run zabbix sender ? 2.Should the proxy have an agent as well ?
Thanks once more for your assistance and help
Best regards Dimitris
1.Should the proxy run zabbix sender ?
No;
2.Should the proxy have an agent as well ?
No;
- In Zabbix server , we defined the storwize host with the storage IP in the ‘Agent’ field , is this correct ?
Yes, correct;
- Communication between storage and proxy is configured as agent. Maybe I need to use SNMP interface instead?
No, you shouldn't use SNMP;
Did you set correct IP or FQDN of zabbix proxy (server) in pystormon.conf ? Did you run python scripts on the zabbix proxy (server) ?
Yes I have set the correct IP of proxy within pystormon.conf. I will try to use FQDn instead and check if something changed.
As far as I remember I have ran python scripts on proxy and were running fine. Can you please provide me the command just to be sure that I used the correct one and to test scripts once more?
Regards Dimitris
Hi, Dimitris
I added printing of response from Zabbix. Please git pull last changes from pystormon github repo, enable printing = True in pystormon.conf, and try to run python scripts. If you have right config and have access to zabbix proxy/server, and storage names matches, you'll see a message like this:
Status of sending data to zabbix:
{"processed": 8, "failed": 0, "total": 8, "time": "0.000205", "chunk": 1}
Hello again Denis,
thanks for your reply.
I made what you mentioned on your last message and i am getting the following meaning that communication between storage and proxy is established successfully. However no metrics yet received......
Hello
Did you config zabbix proxy according to https://www.zabbix.com/documentation/current/manual/distributed_monitoring/proxies ? And set flag "Monitored by proxy" in zabbix for your storage host ? Did you check connection between zabbix server and proxy ?
Hello again Denis,
yesterday i replaced the scripts within pystormon with the latest ones that you uplaoded couple of days ago. I ran each one on proxy and I received data on zabbix but only for the corrsponding time interval as you can see on the below screenshot.
Scripts are supposed to be executed and run periodically so to receive new data each time. However I am not getting any new data apart from those I received during manual execution of scripts.
Is it something that I am making wrong?
Hello, Dimitris
Do you run scripts from host machine or from Docker container ? Is lact check column in zabbix not updating when scripts run from cron jobs ? Is the time in the column always the same when use only cron jobs ?
Hello Denis,
I want to run scripts from proxy. regarding cron jobs are the following that I have to run?
The time in the columns is always the same.
I ran cron jobs that I've sent you on my last message and now I am getting the below on zabbix latest data and the time changes every one minute
Could you show output of command: crontab -l ?
Is that correct????
Yes, that's corect. Is proccess cron running ? Are there lines about run of scripts in /var/log/cron ?
Only the below
No, I dont have such folder within log and I am seeing only the files that i've sent you before. How can I start crond service?
CentOS/RHEL: systemctl start crond Ubuntu/Debian: systemctl start cron
/var/log/cron - it's file, not folder
crond service started and the only cron file generated is the following one
Could you open this file and find lines like: Jan 15 13:10:01 wblproxy CROND[1461]: (root) CMD (/etc/zabbix/externalscripts/pystormon/storage_perfomance.py) ?
Please do this:
chmod +x /etc/zabbix/externalscripts/pystormon/*.py
After that check the lines in /var/log/cron and check the data in zabbix
Worked fine Denis!!!
Super ! :+1:
Thanks a lot for your time and valuable help!!!!
You are welcome ! :)
Just one final question, now that you will close the issue can I access again the comments in the future in case that I will need to remember something?
Yes, of course, comments will be available while github running :)
Resolved
Resolved
Hello,
while checking printing data from the storage via /etc/zabbix/externalscripts/pystormon/storage_cim_print.py I am getting the following:
Can you please assist what might be the problem cause I am not getting any metrics.
Many thanks in advance Dimitris