keep icon indicating copy to clipboard operation
keep copied to clipboard

Centreon Provider

Open mabed-fr opened this issue 10 months ago β€’ 21 comments

Describe the provider you want to add Centreon(nagios)

Describe your use case Send alert from each probe in alert

Are you already using Keep? Yes (Grafana, Alertmanager)

Additional context

  • https://www.centreon.com/fr/editions-centreon/centreon-open-source/

mabed-fr avatar Apr 17 '24 15:04 mabed-fr

/bounty 50

shahargl avatar Apr 17 '24 15:04 shahargl

πŸ’Ž $50 bounty β€’ Keep (YC W23)

Steps to solve:

  1. Start working: Comment /attempt #1113 with your implementation plan
  2. Submit work: Create a pull request including /claim #1113 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to keephq/keep!

Add a bounty β€’ Share on socials

Attempt Started (GMT+0) Solution
πŸ”΄ @35C4n0r Apr 17, 2024, 3:07:54 PM WIP
πŸ”΄ @joshuanazareth97 May 3, 2024, 7:02:57 PM WIP
🟑 @ezhil56x May 19, 2024, 3:41:57 PM #1194

algora-pbc[bot] avatar Apr 17 '24 15:04 algora-pbc[bot]

/attempt #1113 @shahargl kindly assign

Algora profile Completed bounties Tech Active attempts Options
@35C4n0r Β Β Β 6 keephq bounties
+ 7 bounties from 3 projects
Python, HTML,
JavaScript & more
Cancel attempt

35C4n0r avatar Apr 17 '24 15:04 35C4n0r

Assigned @35C4n0r

shahargl avatar Apr 18 '24 06:04 shahargl

@35C4n0r: Reminder that in 4 days the bounty will become up for grabs, so please submit a pull request before then πŸ™

algora-pbc[bot] avatar Apr 20 '24 15:04 algora-pbc[bot]

@mabed-fr Checked both v1 and v2 can't find any alert-related endpoints, though they have notification https://docs-api.centreon.com/api/centreon-web/23.10/#tag/Notification https://docs.centreon.com/docs/alerts-notifications/notif-concept/ https://docs.centreon.com/docs/category/managing-alerts/

35C4n0r avatar Apr 22 '24 19:04 35C4n0r

@mabed-fr Checked both v1 and v2 can't find any alert-related endpoints, though they have notification https://docs-api.centreon.com/api/centreon-web/23.10/#tag/Notification https://docs.centreon.com/docs/alerts-notifications/notif-concept/ https://docs.centreon.com/docs/category/managing-alerts/

@mabed-fr can you confirm if we want to send notifications or alerts?

35C4n0r avatar Apr 24 '24 12:04 35C4n0r

The bounty is up for grabs! Everyone is welcome to /attempt #1113 πŸ™Œ

algora-pbc[bot] avatar Apr 24 '24 15:04 algora-pbc[bot]

@mabed-frVΓ©rifiΓ© Γ  la fois v1 et v2 ne peuvent pas trouver de points de terminaison liΓ©s Γ  l'alerte, bien qu'ils aient une notification https://docs-api.centreon.com/api/centreon-web/23.10/#tag/Notificationhttps://docs.centreon.com/docs/alerts-notifications/notif-concept/https://docs.centreon.com/docs/category/managing-alerts/

@mabed-frpouvez-vous confirmer si nous voulons envoyer des notifications ou des alertes ?

Sorry yes this is an alert in centreon

mabed-fr avatar Apr 25 '24 16:04 mabed-fr

@35C4n0r how is it going?

shahargl avatar Apr 26 '24 09:04 shahargl

I will be dropping this issue.

35C4n0r avatar Apr 27 '24 15:04 35C4n0r

@mabed-fr Can you add more on what is required for this provider integration?

ezhil56x avatar May 02 '24 13:05 ezhil56x

Hi @shahargl can I pick this up if it isn't already being worked on?

joshuanazareth97 avatar May 02 '24 15:05 joshuanazareth97

Hi @shahargl can I pick this up if it isn't already being worked on?

You can! πŸ₯³

talboren avatar May 02 '24 15:05 talboren

@mabed-fr In case you have missed my comment

@mabed-fr Can you add more on what is required for this provider integration?

ezhil56x avatar May 03 '24 11:05 ezhil56x

/attempt #1113

@shahargl @talboren Hi, so just confirming on the plan of implementation, will extend the BaseProvider class, and implement the methods for authentication, config and scope validation, and alert retrieval and formatting. There are 2 fields that require mapping from the Centreon enum to corresponding alert fields in keep:

  1. Status:
        status_mapping = {
            "UP": AlertStatus.RESOLVED,
            "OK": AlertStatus.RESOLVED,
            "DOWN": AlertStatus.FIRING,
            "WARNING": AlertStatus.FIRING,
            "CRITICAL": AlertStatus.FIRING,
            "UNKNOWN": AlertStatus.FIRING,
            "UNREACHABLE": AlertStatus.FIRING,
            "PENDING": AlertStatus.PENDING
        }
  1. Severity:
severity_mapping = {
    1: AlertSeverity.CRITICAL,  # DOWN or CRITICAL -> CRITICAL
    2: AlertSeverity.WARNING,   # WARNING -> WARNING
    3: AlertSeverity.INFO,      # UNKNOWN or UNREACHABLE -> INFO (As there's no direct match)
    4: AlertSeverity.LOW,       # PENDING -> LOW (Considering PENDING as less severe, could also be INFO I guess)
    5: AlertSeverity.LOW        # UP or OK -> LOW
}

Do these mappings and the general approach sound okay? Will go ahead with the implementation then.

Options

joshuanazareth97 avatar May 03 '24 19:05 joshuanazareth97

/attempt #1113

@shahargl @talboren Hi, so just confirming on the plan of implementation, will extend the BaseProvider class, and implement the methods for authentication, config and scope validation, and alert retrieval and formatting. There are 2 fields that require mapping from the Centreon enum to corresponding alert fields in keep:

  1. Status:
        status_mapping = {
            "UP": AlertStatus.RESOLVED,
            "OK": AlertStatus.RESOLVED,
            "DOWN": AlertStatus.FIRING,
            "WARNING": AlertStatus.FIRING,
            "CRITICAL": AlertStatus.FIRING,
            "UNKNOWN": AlertStatus.FIRING,
            "UNREACHABLE": AlertStatus.FIRING,
            "PENDING": AlertStatus.PENDING
        }
  1. Severity:
severity_mapping = {
    1: AlertSeverity.CRITICAL,  # DOWN or CRITICAL -> CRITICAL
    2: AlertSeverity.WARNING,   # WARNING -> WARNING
    3: AlertSeverity.INFO,      # UNKNOWN or UNREACHABLE -> INFO (As there's no direct match)
    4: AlertSeverity.LOW,       # PENDING -> LOW (Considering PENDING as less severe, could also be INFO I guess)
    5: AlertSeverity.LOW        # UP or OK -> LOW
}

Do these mappings and the general approach sound okay? Will go ahead with the implementation then.

Options

Yes, makes sense! Derive your inspiration from other implemented providers -- good examples are Datadog, Grafana, etc.

talboren avatar May 05 '24 14:05 talboren

@joshuanazareth97: Reminder that in 4 days the bounty will become up for grabs, so please submit a pull request before then πŸ™

algora-pbc[bot] avatar May 06 '24 19:05 algora-pbc[bot]

@joshuanazareth97 Are you still on this or can I take up?

ezhil56x avatar May 09 '24 18:05 ezhil56x

@ezhil56x will be raising the PR today

joshuanazareth97 avatar May 10 '24 05:05 joshuanazareth97

The bounty is up for grabs! Everyone is welcome to /attempt #1113 πŸ™Œ

algora-pbc[bot] avatar May 10 '24 19:05 algora-pbc[bot]

/attempt #1113

Algora profile Completed bounties Tech Active attempts Options
@ezhil56x Β Β Β 5 keephq bounties
+ 23 bounties from 10 projects
JavaScript, TypeScript,
Java & more
Cancel attempt

ezhil56x avatar May 19 '24 15:05 ezhil56x

@ezhil56x: Reminder that in 4 days the bounty will become up for grabs, so please submit a pull request before then πŸ™

algora-pbc[bot] avatar May 22 '24 15:05 algora-pbc[bot]

πŸ’‘ @ezhil56x submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar May 24 '24 12:05 algora-pbc[bot]

Keep Documentation for Centreon Provider

Video Link

ezhil56x avatar May 25 '24 10:05 ezhil56x

πŸŽ‰πŸŽˆ @ezhil56x has been awarded $55! 🎈🎊

algora-pbc[bot] avatar May 25 '24 10:05 algora-pbc[bot]