Skip to main content
Declined

OpenTicket: Automatically remove alerts for probes that have returned to OK status.

Related products:Infra Monitoring - Monitoring
  • June 17, 2024
  • 9 replies
  • 104 views

Forum|alt.badge.img+2

Currently, the people who only manage Centreon and have access to 'OpenTicket' spend time closing tickets for alerts that have returned to OK.

When an alert is cleared in Centreon (changing from Critical to OK, for example), the ticket remains open in Open Ticket. We would like a mechanism that removes tickets from the 'Opened Tickets' list whose alert has been cleared in Centreon (dynamically, or via a cron job)

 

 

9 replies

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • July 11, 2024

Hi,

You can create a notification commands (for hosts and services) for a dedicated Open Ticket Rule to close automatically ticket if your ITSM have an dedicated endpoint:

For hosts:

$CENTREONPLUGINS$/centreon_notification_centreon_opentickets_api.pl --plugin=notification::centreon::opentickets::api::plugin --mode=close-host --rule-name="<name_of_rule>" --host-id=$HOSTID$ --api-hostname=localhost --url-path='/centreon/api/' --api-port=80 --api-proto=http --api-username=<API_Centreon_username> --api-password=<API_Centreon_userpassword>

For services:

$CENTREONPLUGINS$/centreon_notification_centreon_opentickets_api.pl --plugin=notification::centreon::opentickets::api::plugin --mode=close-service --rule-name="<name_of_rule>" --host-id=$HOSTID$ ----service-id=$SERVICEID$ --api-hostname=localhost --url-path='/centreon/api/' --api-port=80 --api-proto=http --api-username=<API_Centreon_username> --api-password=<API_Centreon_userpassword>

Don’t forget to change <name_of_rule> and all API parameters


Forum|alt.badge.img+5
  • Centreonian
  • July 12, 2024
NewDiscussion ongoing

rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • July 26, 2024

@maxmia have you tried the solution proposed above?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • July 31, 2024

Hello,

the command indeed works well and allows closing the tickets in Open Ticket. However, the triggering part is not optimal. By placing the command in the 'Event Handler' and checking only 'Recovery' in the 'Notifications' tab, the command seems to execute at each restart of the poller.

This seems to force us to use a script triggered by the 'Event Handler'. With 35k services, we have concerns about the feasibility of this mechanism in production, especially regarding the number of API calls it could generate.


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • September 23, 2024

Hi @maxmia why did you choose event handler command and not a notification command ?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • October 7, 2024

Hi,

thx for the support.

 

I just created a user 'autoclose', on which I set a notification on 'recovery', with the latter launching my command 'Cmd-Autoclose'. By enabling recovery notifications on all my services and setting 'autoclose' as an 'implied contact', it seems to work.

Is this the correct method?

There is still a warning issue during the export/reload of the pollers, which gives me the warning 'Warning: Service recovery notification option for contact 'Autoclose' doesn't make any sense - specify critical and/or warning options as well'


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • October 7, 2024

Hi @maxmia Your method is correct.

Do not take this warning message into account.


Forum|alt.badge.img+2
  • Author
  • Steward *
  • October 10, 2024

It’s all good. Thx


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • October 18, 2024
Discussion ongoingDeclined