Skip to main content

Hello,

To answer about the issue https://github.com/centreon/centreon-plugins/issues/3671 

Many plugins exist to notify or open/close ticket :

Ticketing :

Notification

A tutorial exist for implement Teams notifications also :

My idea about the centreon-plugins of notification, is to plugin packed them with a dedicated subsection.

By this parameter, the plugin would be deployed on the poller (New feature of 22.04) and could be configure or preconfigure the notification command.

In fact, the Notification Commands page is not really simple to understand, by default we have preconfigured command like :

  • bam-notify-by-mail

All the notification command are just a printf command to embedded the result of printf command in a mail command, an epager command, except for Jabber where a NRPE command is defined.

If you want an exemple to configure a notification command like the plugins, you don’t have that :p

The goal of this idea, is to facilitate the configuration of a notification command and maybe extend the possibility of notifications process of Centreon by the plugins more easily.

As the Idea to refresh the UI of command and macro :

The notification Command could be improved with a JS Library of Code Editor 

https://openbase.com/categories/js/best-javascript-html-editor-libraries

  • Persona : As a Centreon administrator

  • Problem to solve : Configure a notification command is not easy to understand with the existent (mail, epager, etc..) Many organization looking for to exit of mail notification for the alerting process. 

  • Expected outcome : Use the Plugin Pack process to facilitate the process of configuration about the notification command and maybe more and extend the possibility of notification more easily.

  • Potential solutions : Build a new subsection of plugin pack in order to configure or pre-configure the notification command. For the preconfigured command, you could indicate the command is partially configured (Please add server, port, protocol, etc.. and others) you could arbitrary preconfigure the centreon URL by replacing it with the centreon parameter, 

Regards,

Greg

Hello,

I forgot on the skeleton of idea, the creation of the contact who used with the notify command, otherwise it’s useless.

Regards,

Greg


Updated idea statusNewDiscussion ongoing

Hi @gespada,

I would be very interested to have a talk with you regarding this idea if you agree.

Can you send me a direct message?

Regards


Hi @gespada,

As we discussed it, we are about to start working on a new notification process that will neither rely on centengine, nor on notification commands as we know them. Given this, we presumably won’t prioritize working on the notification commands you are asking :-/

Maybe we can open a discussion in the Community Contributions section to exchange commands?


Discussion ongoingDeclined

Hello, could someone help me with how to automatically open GLPI calls via API in Centreon? Thank you very much
 

 

 

 


Have you checked https://docs.centreon.com/docs/integrations/itsm/ot-glpi/ ?


I tried via plugin but I got this message when I open the call.Via api rest I made the connection, but I don't know how to proceed to create the calls

Sorry, i gave you an old version support, the connectors to recent GLPI versions are documented here.


I use the GLPI 10, maybe its not compatible?

 

How could integrate the systems, is important to us.


Hello,

 

first of all, a few questions

which version of glpi are you using? 

are you using the behavior plugin in glpi?

 

for your information, here are some curl commands that you can use to test things easily.

First of all you need a session token (change the address, protocol and tokens according to your situation)

curl -k -X GET 'http://xxx.xxx.xxx.xxxx/glpi/apirest.php/initSession' \
--header 'App-Token: xxxxxxxxxxxxxx' \
--header 'Authorization: user_token yyyyyyyyyyyyyy' \
--header 'Content-Type: application/json'

 

then you can try to open a very basic ticket (replace the address, session token and entity id)

curl -k -X POST 'http://xxx.xxx.xxx.xxx/glpi/apirest.php/Ticket' \
--header 'Session-Token: xxxxx' \
--header 'Content-Type: application/json' \
-d '{
"input": {
"name": "ticket title",
"content": "this is a fake ticket",
"entities_id": "REPLACE WITH YOUR ENTITY ID"
}
}'

 

Obviously you should have the same error message but having those curl commands with the endpoint can help you find out which permissions are missing. 

 

Finally, you should be able to configure some logging on the glpi api side and you may find some useful information in the appropriate log file that might be located in /var/www/html/glpi/files/_log (or wherever is your glpi installation directory)

 

Regards


through the terminal I can create the call, but I would like to do something automatic so that when there is a critical alarm it opens automatically.

if by automatic, you mean using a command line such as the following: 

 

/usr/lib/centreon/plugins/centreon_notification_centreon_opentickets_api.pl --mode=open-service --api-hostname="my-centreon-address" --api-username="centreon-api-user" --api-password="password" --rule-name=GLPI --host-id=15 --service-id=60 --service-state=CRITICAL  --service-output="test" --select='severity=Medium'

 

you must be using centreon with version 22.10 first (in the first message i’ve seen the version 22.04 but i’m not sure if that is the version you are currently running)

 

if you are using the 22.10 version, you should have the following file /usr/share/centreon/www/modules/centreon-open-tickets/class/automatic.class.php

 

if that’s the case, could you provide us the command line that you were using, the message it displays and the full open ticket rule configuration that you have (make sure to hide any sensitive information such as addresses, passwords, tokens...)

 

Regards


I ran the code in the cli, but it gives an error, how can I create the plugin?