-
Notifications
You must be signed in to change notification settings - Fork 29
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
Forwarding the SNMP traps from snmp_notifier running on kubernetes to alerting system #98
Comments
sharing the alertmanagert YAML and the snmp_notifier deployment manifest files again as they might not be clear in the above issue opening page global:
apiVersion: apps/v1
|
Hi @snimje, I have a similar case of yours and got it working, so I have some tips for you:
You may change as many paremeters as you want. You have other ways to inject data/variables in kubernetes, I just gave you @maxwo, Hope that's helps. Cheers, Alberto Viana |
I am considering providing a Helm chart to help deploy on Kubernetes clusters. There is already an issue on this: #22 |
@albertocrj Here is a Helm chart to deploy on Kubernetes: https://github.com/maxwo/snmp-notifier-helm-chart I will create a PR to add it the the Prometheus community charts, so that deployment next to an already up Prometheus instance will be even easier. |
Hi @maxwo, Thanks |
What did you do?
ran the snmp-notifier as a deployment inside a kubernetes cluster. the YAML file is as below:
`---
apiVersion: apps/v1
kind: Deployment
metadata:
name: snmp-notifier-deployment
namespace: pf9-monitoring
labels:
component: snmp-notifier
spec:
replicas: 1
selector:
matchLabels:
app: snmp-notifier
template:
metadata:
labels:
app: snmp-notifier
spec:
containers:
- image: maxwo/snmp-notifier:v1.2.1
name: snmp-notifier
ports:
- containerPort: 9464
name: web-endpoint
protocol: TCP
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 256Mi
apiVersion: v1
kind: Service
metadata:
name: snmp-notifier-service
namespace: pf9-monitoring
spec:
type: ClusterIP
ports:
- name: web-endpoint
port: 9464
targetPort: 9464
protocol: TCP
selector:
app: snmp-notifier
...
Webhook: My webhook config:
global:resolve_timeout: 5m
route:
group_by: ['...']
group_wait: 3s
group_interval: 1m
repeat_interval: 15m
receiver: 'snmp_notifier'
receivers:
webhook_configs:
url: http://10.140.15.246:9464/alerts`
10.140.15.246 is IP of snmp_notifier service.
I can see the alerts are posted from alert-manager to snmp_notifier in the snmp_notifier pod's log
10.139.200.2 - - [21/Jan/2022:16:30:09 +0000] "POST /alerts HTTP/1.1" 200 0
I would like to know to things
[1] Is this configuration correct ?
[2] Additional configuration procedure to forward these alerts from snmp_notifier pod to the external legacy alerting system say netcool. This I could not find anywhere. Is there a secret that one need to create ? It will be helpful if I can get some help on how to set this up with an example. Thank you!
What did you expect to see?
procedure to forward the SNMP traps received in the snmp_notifier pod to the alerting system.
What did you see instead? Under which circumstances?
Environment
Kubernetes 1.21
Linux 3.10.0-957.1.3.el7.x86_64 x86_64
snmp_notifier, version 1.2.1 (branch: HEAD, revision: 73773b7)
build user: root@4c095c7fad1b
build date: 20210820-08:20:04
go version: go1.16
platform: linux/amd64
alertmanager, version 0.21.0 (branch: HEAD, revision: 4c6c03ebfe21009c546e4d1e9b92c371d67c021d)
build user: root@dee35927357f
build date: 20200617-08:54:02
go version: go1.14.4
prometheus, version 2.32.1 (branch: HEAD, revision: 41f1a8125e664985dd30674e5bdf6b683eff5d32)
build user: root@54b6dbd48b97
build date: 20211217-22:08:06
go version: go1.17.5
platform: linux/amd64
/bin/snmp_notifier --snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl
The text was updated successfully, but these errors were encountered: