zabbix-cachet
zabbix-cachet copied to clipboard
Add support of Zabbix 6+
We are trying to integrate zabbix-cachet with zabbix 6,
getting below error in logs
2022-08-02 12:33:10 INFO: (MainThread) Zabbix ver: 6.0.6. Cachet ver: 2.4.0-dev 2022-08-02 12:33:10 ERROR: (MainThread) Zabbix Error: ('Error -32602: Invalid params., Invalid parameter "/": unexpected parameter "selectDependencies".', -32602) 2022-08-02 12:33:10 ERROR: (MainThread) Sorry, can not create Zabbix <> Cachet mapping for you. Please check above errors
Same problem here, would be great if @qk4l could make it work with zabbix 6+.
Same problem with version 6.0.9... Hope it's gonna be fixed, but I saw the last edit was 16 months ago...
I ended up creating a bash script, mapping components manually through zabbix' tags and media.
can you share your script @kelsen ? it may help us :)
Basically you have to put this script on Zabbix AlertScript directory (/usr/lib/zabbix/alertscripts/). Configure Zabbix triggers' tags scope and service. Create Zabbix' media with content below as message body, both incident and recovery message type.
host: {HOST.NAME}
severity: {EVENT.NSEVERITY}
scope: {EVENT.TAGS.scope}
service: {EVENT.TAGS.service}
status: {TRIGGER.VALUE}
Customize script to mapp zabbix service or hostname to cachet component.
Hi, I am working to get Zabbix-Cachet compatible with Zabbix 6.0. Although I've not finished, I can say it works (with some limitations). I've forked this repository into my account, you can check it here.
The "service" definition of Zabbix has changed. I've updated from Zabbix 4 to Zabbix 6, so I don't know how Zabbix services 5 were. With Zabbix 6, triggers are not linked to services anymore. As with Zabbix 6 API it's not possible to get the triggers from the service, there are some issues:
- My version does not support automatic trigger problem acknowledgments. You must acknowledge them from Cachet.
- Trigger names, URL and descriptions cannot be gotten.
There might be some bugs on the code, I'm currently working on it as we need it on our organization. You're welcome to try it and create issues on my repository. When I consider the work finished, I'll make a pull request here.
Hello,
Thank you guys, for reporting and forks and tries to fix it. I will deploy Zabbix 6.0 on this weekends and will try to find properly solution.
Hello, I've finished my work. These are the changes I've made:
- Change trigger references to service references
- New template for customizing incident description, as with Zabbix6 it's not possible to get trigger problems. You'll have to delete all the component and component groups to make sure zabbix-cachet correctly maps component/groups with services.
The issue which is described changes with Services in Zabbix 6.0 https://support.zabbix.com/browse/ZBXNEXT-6674
Thank you for the link. I'll take a look.
We migrated from Zbx4 to Zbx6, upgrading the database, and the this is how our services look now.
The trigger IDs are inside Service value field (in this case 101011) and the name field is ServiceLink.
As far as I remember, I solved the problem here - https://github.com/pavelnemirovsky/zabbix-cachet, created PR as well - https://github.com/qk4l/zabbix-cachet/pull/71
I'm working here https://github.com/qk4l/zabbix-cachet/tree/zabbix6 Hope to finished this weekend
@qk4l, pay attention to the PR above, it works with Zabbix 6.0 - 6.4
@qk4l, pay attention to the PR above, it works with Zabbix 6.0 - 6.4
2024-05-03 08:27:32 INFO: (MainThread) Zabbix ver: 6.0.13. Cachet ver: 2.4.1 2024-05-03 08:27:32 ERROR: (MainThread) Zabbix Error: ('Error -32602: Invalid params., Invalid parameter "/": unexpected parameter "selectDependencies".', -32602) 2024-05-03 08:27:32 ERROR: (MainThread) Sorry, can not create Zabbix <> Cachet mapping for you. Please check above errors
I tried it on your version, the result is the same(
@pavelnemirovsky Thank you for your PR!
I've incorporated parts of it into the codebase. The refactorization and separation into multiple files greatly enhances maintainability, albeit adding some complexity to the deployment process. To streamline this, I'll be deploying a PyPI package shortly.
For not the easiest way would be to use docker image
docker run --name zabbix-cachet -v $PATH_TO_CONFIG_FILE:/config.yml qk4l/zabbix-cachet:2.0.0
I've conducted testing on Zabbix versions 5.0, 6.0, and 6.4, and haven't encountered any issues except for the unimplemented escalation priority feature. Please verify that everything you require functions as expected, and do let me know if there are any discrepancies.
Big thanks to everyone for your collaboration and waiting. Your contributions are immensely valued and appreciated.
Implemented since zabbix-cachet 2.0.0
Thanks again everyone for help and pushing me. =)