OPSI integration with Zabbix
OPSI integration with Zabbix
Hi,
I'd like to monitore in my Zabbix server when a new client "reported failures" in OPSI.
Can someone help me to find the indicator in OPSI when a product installation status changes from "success (setup)" to "failed (setup)" and vice-versa ?
Thanks for your help.
I'd like to monitore in my Zabbix server when a new client "reported failures" in OPSI.
Can someone help me to find the indicator in OPSI when a product installation status changes from "success (setup)" to "failed (setup)" and vice-versa ?
Thanks for your help.
Re: OPSI integration with Zabbix
Hi,
You can see the .ini conf file from each client here /var/lib/opsi/config/clients/
Look at each file and you can see the "actionresult = failed" if the product have fail the installation.
Don't know if there is a better method
You can see the .ini conf file from each client here /var/lib/opsi/config/clients/
Look at each file and you can see the "actionresult = failed" if the product have fail the installation.
Don't know if there is a better method
Re: OPSI integration with Zabbix
Thanks for the information.
I share with the community my template for zabbix and the recipe ti get it work :
1. Give zabbix user the right to read /var/lib/opsi/config/clients :
2. Add zabbix agent UserParameter :
3. Restart zabbix-agent
4. Upload the attached template in zabbix and apply it to your OPSI server. Template monitores also these OPSI process : opsi-atftpd, opsiconfd, opsipxeconfd
Any comment or enhancement are welcome !
PS : i can't upload the template, i have error message "Sorry, the board attachment quota has been reached". Can the webmaster fix that ? Here is a temporary link to download it : http://213.251.184.107/zabbix_OPSI_template.xml
I share with the community my template for zabbix and the recipe ti get it work :
1. Give zabbix user the right to read /var/lib/opsi/config/clients :
Code: Alles auswählen
adduser zabbix pcpatch
Code: Alles auswählen
cat /etc/zabbix/zabbix_agentd.conf.d/zabbix_agent.userparams_opsi.conf
UserParameter=opsi.nb_products_errors,grep "actionresult = failed" /var/lib/opsi/config/clients/* | wc -l
UserParameter=opsi.computers_with_errors,grep "actionresult = failed" /var/lib/opsi/config/clients/*| cut -d ':' -f 1 | cut -d '/' -f 7 | sed -e 's/\(.*\)\.ini$/\1/' | sort | uniq
Code: Alles auswählen
/etc/init.d/zabbix-agent restart
Any comment or enhancement are welcome !
PS : i can't upload the template, i have error message "Sorry, the board attachment quota has been reached". Can the webmaster fix that ? Here is a temporary link to download it : http://213.251.184.107/zabbix_OPSI_template.xml
Re: OPSI integration with Zabbix
you can try to use the OPSI-Webservice to get these informations directly from the OPSI-Backend. (JSON-RPC)
Or if you use the MySQL-Backen (Cofinanced Module) you can get the report out of the database.
(it's not recommend by UIB to get Informations directly out of the Backend, whether from database or filebackend. )
Thats only an idea, I don't know how zabbix works
Or if you use the MySQL-Backen (Cofinanced Module) you can get the report out of the database.
(it's not recommend by UIB to get Informations directly out of the Backend, whether from database or filebackend. )
Thats only an idea, I don't know how zabbix works

- n.wenselowski
- Ex-uib-Team
- Beiträge: 3194
- Registriert: 04 Apr 2013, 12:15
Re: OPSI integration with Zabbix
Hello,
I'd recommend using the webinterface or the command-line tool opsi-admin because with these methods you can change your Backends to whatever you like and still have the functionality you want.
You then could use the methods getClientsWithFailed_hash and productOnClient_getHashes.
Kind regards
N. Wenselowski
I'd recommend using the webinterface or the command-line tool opsi-admin because with these methods you can change your Backends to whatever you like and still have the functionality you want.
You then could use the methods getClientsWithFailed_hash and productOnClient_getHashes.
Kind regards
N. Wenselowski
Code: Alles auswählen
import OPSI
Re: OPSI integration with Zabbix
Hi,
You can use also use the opsi-nagios-connector Extension from opsi. With this extension you have much more possibilities to monitor your opsi infrastructure. I think the only thing you must do is to modify the check_opsi plugin, that it will run with zabbix.
You can use also use the opsi-nagios-connector Extension from opsi. With this extension you have much more possibilities to monitor your opsi infrastructure. I think the only thing you must do is to modify the check_opsi plugin, that it will run with zabbix.
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: OPSI integration with Zabbix
Hi,
I've just bought a Mysql Backend licence and my initial script doesn't work anymore
Do you have some example script using API, I will try to do the job using it.
Thanks.
I've just bought a Mysql Backend licence and my initial script doesn't work anymore

Do you have some example script using API, I will try to do the job using it.
Thanks.
- n.wenselowski
- Ex-uib-Team
- Beiträge: 3194
- Registriert: 04 Apr 2013, 12:15
Re: OPSI integration with Zabbix
Hello aellert,
the manual has a small section about opsi-admin right here.
You can try to use the methods I suggested in my earlier post or use the opsi-nagios-connector
With kind regards
N. Wenselowski
the manual has a small section about opsi-admin right here.
You can try to use the methods I suggested in my earlier post or use the opsi-nagios-connector

With kind regards
N. Wenselowski
Code: Alles auswählen
import OPSI