Open r0039 opened 5 years ago
Also I provide what did I implement?
sky@zabbix4-srv-01:/opt/packages$ sudo git clone https://github.com/bezarsnba/zabbix-graylog-monitoring.git
sky@zabbix4-srv-01:/opt/packages$ cd zabbix-graylog-monitoring/
sky@zabbix4-srv-01:/opt/packages/zabbix-graylog-monitoring$ sudo mkdir /etc/zabbix/scripts
sky@zabbix4-srv-01:/opt/packages/zabbix-graylog-monitoring$ sudo chmod +x /etc/zabbix/scripts/monitoring-graylog.py
sky@zabbix4-srv-01:/etc/zabbix/scipts$ python3
python3 python3.5 python3.5m python3m
sky@zabbix4-srv-01:/etc/zabbix/scipts$ python3.5 monitoring-graylog.py lldgraylognode
{
"data":[
{
"{#NODEID}":"74654950-8fa7-4b2f-ac1f-afe08d2d1b02"
}
]
}
sky@zabbix4-srv-01:/etc/zabbix/scipts$ grep Include /etc/zabbix/zabbix_agentd.conf
### Option: Include
# Include=
Include=/etc/zabbix/zabbix_agentd.d/*.conf
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
# Include=/usr/local/etc/zabbix_agentd.conf.d/
# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
sky@zabbix4-srv-01:/etc/zabbix/scipts$ sudo cp /opt/packages/zabbix-graylog-monitoring/user_parameter_graylog.conf /etc/zabbix/zabbix_agentd.d/
sky@zabbix4-srv-01:/etc/zabbix$ zabbix_get -s 10.30.3.117 -k graylog.discovery.node
{
"data":[
{
"{#NODEID}":"74654950-8fa7-4b2f-ac1f-afe08d2d1b02"
}
]
}
sky@zabbix4-srv-01:/etc/zabbix/zabbix_agentd.d$ zabbix_get -s 10.30.3.117 -k graylog.cluster.status['74654950-8fa7-4b2f-ac1f-afe08d2d1b02',lb_status]
alive
hi @bezarsnba could you please help me on this issue? Thank you so much!
Hi @r0039 at moment we didn't test the items on Graylog 3.0 only 2.4, I go to test and to verify the error.
Hi @r0039 , Can do you a test? Of your Zabbix Server run this command:
zabbix_get -s
Thanks
I am glad to receive your message @bezarsnba !!!
Help you investigate fastly, I show my topology:
Graylog server: 10.30.3.118
Zabbix server: 10.30.3.117
With your command, I did run as below:
sky@zabbix4-srv-01:~$ zabbix_get -s -k graylog.proc.buffer[ProcessBufferProcessor.processTime,m5_rate]
usage:
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
--tls-connect cert --tls-ca-file CA-file
[--tls-crl-file CRL-file] [--tls-agent-cert-issuer cert-issuer]
[--tls-agent-cert-subject cert-subject]
--tls-cert-file cert-file --tls-key-file key-file -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
--tls-connect psk --tls-psk-identity PSK-identity
--tls-psk-file PSK-file -k item-key
zabbix_get -h
zabbix_get -V
Then, I added the host-name-or-IP
sky@zabbix4-srv-01:~$ ifconfig | grep 10.
inet addr:10.30.3.117 Bcast:10.30.3.255 Mask:255.255.255.0
collisions:0 txqueuelen:1000
sky@zabbix4-srv-01:~$ zabbix_get -s 10.30.3.117 -k graylog.proc.buffer[ProcessBufferProcessor.processTime,m5_rate]
0.01342501439436139
sky@zabbix4-srv-01:~$ zabbix_get -s 10.30.3.118 -k graylog.proc.buffer[ProcessBufferProcessor.processTime,m5_rate]
zabbix_get [15110]: Check access restrictions in Zabbix agent configuration
Please let me know what can I do to help you find out. I am always welcoming.
I don't know if you are still working on the weekend? 🙆♂️ I am waiting for your information about this issue. Thank you for your time ! and your contribution @bezarsnba !
@bezarsnba have a nice week! I hope you can arrange the time to fix this issue. I am using it in my infrastructure and really appreciate your help. Thank you.
Hi @r0039 Sorry to the delay, how is the configuration of the host in the Zabbix, do you configured the IP 10.30.3.117? Because in your test, it's ok to 10.30.3.117
hi @bezarsnba the configuration of zabbix agent declared 10.30.3.117 in Server item.
Server=127.0.0.1,10.30.3.117,10.30.3.118
Also I would like to provide my configuration:
Zabbix Server:
sky@zabbix4-srv-01:~$ sudo vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1,10.30.3.117,10.30.3.118
ServerActive=127.0.0.1
Graylog Server: sky@graylog-srv-02:~$ vim /etc/zabbix/zabbix_agentd.conf Server=10.30.3.117 ServerActive=10.30.3.117
And I wanted to monitor Graylog what already installed at server 10.30.3.118.
Please let me know to help your debugging.
also only GrayLog Processes and Service Status are working fine.
In your zabbix_server.log, have some error message to the items not supported? If yes, can you send to me the output error? please. Thanks
Could you send the user_parameter_graylog.conf? Please
@bezarsnba sorry for late reply.
Here is zabbix_server.log:
item "graylog-srv-02:graylog.proc.buffer[ProcessBufferProcessor.processTime,m5_rate]" became not supported: Unsupported item key.
and here is user_parameter_graylog.conf
UserParameter=graylog.node.men[*],/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py monnode $1 $2
UserParameter=graylog.cluster.status[*],/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py moncluster $1 $2
UserParameter=graylog.inter.log[*],/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py monmetric $1 $2
UserParameter=graylog.journal.size[*],/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py monmetric $1 $2
UserParameter=graylog.proc.buffer[*],/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py monprocessbuffer $1 $2
UserParameter=graylog.discovery.node,/usr/bin/python3 /etc/zabbix/scripts/monitoring-graylog.py lldgraylognode
Thank you so much :-)
Could you send the value of option "Timeout" that is on zabbix_agentd.conf ?. Run this command on graylog to get this information grep Timeout /etc/zabbix/zabbix_agentd.conf
@bezarsnba Timeout is commented. So do I need to uncomment?
sky@graylog-srv-02:~$ grep Timeout /etc/zabbix/zabbix_agentd.conf
### Option: Timeout
# Spend no more than Timeout seconds on processing
# Timeout=3
Also I have uncommented and updated the Timeout=3
, then Timeout=5
, but nothing to changed.
sky@graylog-srv-02:~$ sudo sed -i 's/Timeout=3/Timeout=5/' /etc/zabbix/zabbix_agentd.conf
sky@graylog-srv-02:~$ grep Timeout /etc/zabbix/zabbix_agentd.conf
### Option: Timeout
# Spend no more than Timeout seconds on processing
Timeout=5
sky@graylog-srv-02:~$ sudo systemctl restart zabbix-agent.service
hi @bezarsnba have a nice week ahead! Hope you can arrange your time for this issue on this week. Thank you so much :-)
@bezarsnba i hope you can let me know some advices what I can do. Thank you.
@bezarsnba I did try it but still could not solve. Hope you have time to see this. Thank you.
@bezarsnba I am also experiencing issues with items in this template being unsupported. I've gone through most of what you and r0039 have been working on and made any changes where necessary.
It seems that most Zabbix Templates for Graylog have not been touched since Graylogs latest major release.
@bezarsnba I am also experiencing issues with items in this template being unsupported. I've gone through most of what you and r0039 have been working on and made any changes where necessary.
It seems that most Zabbix Templates for Graylog have not been touched since Graylogs latest major release.
I had the same issue Is your graylog is behind nginx revers proxy? I have found that graylog API is not always working fine behind proxy. Try to look this way.
@EmPRio93 Graylog is not behind a proxy. I've got a three node setup with the two slave nodes running elasticsearch. Until someone with more knowledge than I have picks this back up, I am not sure there is anything else I can do.
Go to file monitoring-graylog.py
and edit first line or can replace it with
#!/usr/bin/python3
Then go to user_parameter_graylog.conf
and change it to look like:
UserParameter=graylog.node.men[*],/etc/zabbix/scripts/monitoring-graylog.py monnode $1 $2 UserParameter=graylog.cluster.status[*],/etc/zabbix/scripts/monitoring-graylog.py moncluster $1 $2 UserParameter=graylog.inter.log[*],/etc/zabbix/scripts/monitoring-graylog.py monmetric $1 $2 UserParameter=graylog.journal.size[*],/etc/zabbix/scripts/monitoring-graylog.py monmetric $1 $2 UserParameter=graylog.proc.buffer[*],/etc/zabbix/scripts/monitoring-graylog.py monprocessbuffer $1 $2 UserParameter=graylog.discovery.node,/etc/zabbix/scripts/monitoring-graylog.py lldgraylognode
This solved almost all my problems
it dont wokr on zabbix version 5.0 and Graylog 4.2 Error: Unsupported item key. Do you have any idea?
Hi,
I hope you are still working on this git release. I am having an issue with my system. Hope I can receive any feedback from you to fix it.
My system:
I tightly followed your instruction, however, this is not the same version of Zabbix and Python, then I got any issue [not supported] with following templates:
Here is the error
Could you please help me fix it? Thank you so much!