Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centreon Provider #1113

Closed
mabed-fr opened this issue Apr 17, 2024 · 26 comments · Fixed by #1194
Closed

Centreon Provider #1113

mabed-fr opened this issue Apr 17, 2024 · 26 comments · Fixed by #1194
Assignees
Labels

Comments

@mabed-fr
Copy link

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

@shahargl shahargl changed the title Centreon Centreon Provider Apr 17, 2024
@shahargl
Copy link
Member

/bounty 50

@shahargl shahargl added the Provider Providers related issues label Apr 17, 2024
Copy link

algora-pbc bot commented Apr 17, 2024

💎 $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 bountyShare 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

@35C4n0r
Copy link
Contributor

35C4n0r commented Apr 17, 2024

/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

@shahargl
Copy link
Member

Assigned @35C4n0r

Copy link

algora-pbc bot commented Apr 20, 2024

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

@35C4n0r
Copy link
Contributor

35C4n0r commented Apr 22, 2024

@35C4n0r
Copy link
Contributor

35C4n0r commented Apr 24, 2024

@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?

Copy link

algora-pbc bot commented Apr 24, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #1113 🙌

@mabed-fr
Copy link
Author

@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

@shahargl
Copy link
Member

@35C4n0r how is it going?

@35C4n0r
Copy link
Contributor

35C4n0r commented Apr 27, 2024

I will be dropping this issue.

@35C4n0r 35C4n0r removed their assignment Apr 27, 2024
@ezhil56x
Copy link
Contributor

ezhil56x commented May 2, 2024

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

@joshuanazareth97
Copy link

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

@talboren
Copy link
Member

talboren commented May 2, 2024

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

You can! 🥳

@ezhil56x
Copy link
Contributor

ezhil56x commented May 3, 2024

@mabed-fr
In case you have missed my comment

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

@joshuanazareth97
Copy link

joshuanazareth97 commented May 3, 2024

/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.

@talboren
Copy link
Member

talboren commented May 5, 2024

/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.

Copy link

algora-pbc bot commented May 6, 2024

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

@ezhil56x
Copy link
Contributor

ezhil56x commented May 9, 2024

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

@joshuanazareth97
Copy link

@ezhil56x will be raising the PR today

Copy link

algora-pbc bot commented May 10, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #1113 🙌

@ezhil56x
Copy link
Contributor

ezhil56x commented May 19, 2024

/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

Copy link

algora-pbc bot commented May 22, 2024

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

Copy link

algora-pbc bot commented May 24, 2024

💡 @ezhil56x submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@ezhil56x
Copy link
Contributor

Keep Documentation for Centreon Provider
2024-05-25.16-05-57.mp4

Copy link

algora-pbc bot commented May 25, 2024

🎉🎈 @ezhil56x has been awarded $55! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants