-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: added newrelic receiver #2637
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
base: main
Are you sure you want to change the base?
Conversation
cf7b479 to
034ef2c
Compare
|
Hi @beorn7 I found your name from other PR. Could you please help to review this PR? It passed all tests except "test_frontend". I think it is related to the change to "template/default.tmpl". Not sure how to fix it on my end. My local test passed successfully. Thanks in advance! |
|
Thanks for your contribution. However, I'm not the maintainer of this repo. I helped a bit on a best effort basis, but right now, I have zero time left to do things here. @simonpasquier could you look at this or delegate? |
|
Thanks @beorn7 @simonpasquier Please advise when you have a chance. Thanks! |
roidelapluie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would review this later, in the mean time I have added a comment. it also seems that the documentation is completely missing.
@roidelapluie Thanks for pointing out the missing documentation. How do I provide the documentation? in what format? |
|
In markdown, in the docs/ directory |
|
@roidelapluie The New Relic receiver documentation is included in |
|
@roidelapluie One of the customers really wants to have this feature merged into the master so that they could use in production. Could you please review at your earliest? Thanks. |
|
As a side note, could you please sign the DCO, @haihongren ? |
|
@RichiH Thanks for the comment. DCO signed for the commit. |
|
is it possible to have a test account at NR to test this? |
|
@roidelapluie I have added prometheus-team email address as an NR user. You should receive an email invite at the prometheus-team email account. |
|
@roidelapluie Is there anything else you need to proceed with the PR? |
|
Thanks! I finally have some time to dig into this. Do you know how I can create an API key that works? I currently get 403 with the key I created. |
|
I also wonder if we should use the logs api or the incidents API. |
Signed-off-by: haihongren <haihong.ren@gmail.com>
Signed-off-by: haihongren <haihong.ren@gmail.com>
5266a3e to
68f90b9
Compare
@roidelapluie Logs api allows user to collect alerts, generate report/dashboard for alerts, even take further action if required.
|
Signed-off-by: haihongren <haihong.ren@gmail.com>
|
Hi guys, any update on this? |
|
Hi, can someone please review the PR? thanks |
siavashs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR still valid? If yes, please rebase and address the comments.
| }, nil | ||
| } | ||
|
|
||
| type NewRelicCreateMessage struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type is not exported.
| type NewRelicCreateMessage struct { | |
| type newRelicMessage struct { |
| - `<duration>`: a duration matching the regular expression `((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)`, e.g. `1d`, `1h30m`, `5m`, `10s` | ||
| - `<labelname>`: a string matching the regular expression `[a-zA-Z_][a-zA-Z0-9_]*` | ||
| - `<labelvalue>`: a string of unicode characters | ||
| - `<filepath>`: a valid path in the current working directory | ||
| - `<boolean>`: a boolean that can take the values `true` or `false` | ||
| - `<string>`: a regular string | ||
| - `<secret>`: a regular string that is a secret, such as a password | ||
| - `<tmpl_string>`: a string which is template-expanded before usage | ||
| - `<tmpl_secret>`: a string which is template-expanded before usage that is a secret | ||
| - `<int>`: an integer value | ||
| - `<regex>`: any valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) (The regex is anchored on both ends. To un-anchor the regex, use `.*<regex>.*`.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unnecessary to change the format of the bullet points.
| [ wechat_api_secret: <secret> ] | ||
| [ wechat_api_corp_id: <string> ] | ||
| [ newrelic_api_key: <secret> ] New Relic Insert API key | ||
| [ newrelic_api_url: <string> | default = "https://log-api.newrelic.com/log/v1" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API endpoint seems to be dedicated for sending logs, nothing wrong with logging alerts but is this still a valid API endpoint to send alert messages to or is there now a dedicated endpoint for alerts?
| # All alerts that do not match the following child routes | ||
| # will remain at the root node and be dispatched to 'default-receiver'. | ||
| routes: | ||
| # All alerts with service=mysql or service=cassandra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary reformatting.
| time_intervals: | ||
| [ - <time_interval_spec> ... ] | ||
| time_intervals: [- <time_interval_spec> ...] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary reformatting.
Not going to point out the rest, make sure to remove them.
| type NewRelicCloseMessage struct { | ||
| Source string `json:"source"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
Hey guys
I am working for New Relic. I have added the code for the newrelic receiver.
Could you please review the PR and advise me the next step.
Thanks,
Haihong