Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
High availability
»
haproxy endpoint monitoring
« previous
next »
Print
Pages: [
1
]
Author
Topic: haproxy endpoint monitoring (Read 7060 times)
ikkeT
Jr. Member
Posts: 58
Karma: 1
haproxy endpoint monitoring
«
on:
October 16, 2020, 11:07:36 am »
Hi,
I use haproxy for exposing my services to internet. I'd want to monitor the services behind the haproxy, and though it would be the easiest to use telegraf, which I also use, to publish the backend stats into influxdb. Grafana could then give alerts if they start failing.
Other options would be to run prometheus with alert manager somewhere, but I have all the above tools aready in place. Would telegraf plugin maintainer be interested of adding the haproxy endpoints to monitored objects? Has anyone already done that?
Or do you use some other alert mechanism for monitoring availability from OPNsense?
Logged
ikkeT
Jr. Member
Posts: 58
Karma: 1
Re: haproxy endpoint monitoring
«
Reply #1 on:
October 16, 2020, 11:12:33 am »
mmmm, seems to be there already... ooops. I'll give it a try.
Logged
ikkeT
Jr. Member
Posts: 58
Karma: 1
Re: haproxy endpoint monitoring
«
Reply #2 on:
January 04, 2021, 02:52:44 pm »
Happy new year! I wanted to give some feedback here. I am happy user of HAproxy on OPNsense. I just automated my setup monitoring also OPNsense HAproxy status using grafana. For anyone interested, here's how to get grafana set up against such setup.
Here's how to run grafana in container, automated by ansible. So I don't need backups, as it will create the grafana end from scratch:
https://redhatnordicssa.github.io/grafana-rootless-container-ansible
Here's a dashboard I use, it prints out all services set for HAproxy. I want to have red/green status if service is doing fine. Lower at the dashboard there are some values of stats. I just took random sample here, the page is really long outside the screenshot. The third attachment is the json for creating such dashboard. I use ansible to push it it in my home setup.
I just wanted to contribute my monitoring setup in hopes it helps someone. Have fun!
Note that this requires you run influxdb somewhere and set that up as a source to grafana. Also need to enable haproxy stats telegraf plugin in OPNsense. I'm happy to describe more if someone is interested.
«
Last Edit: January 04, 2021, 02:54:35 pm by ikkeT
»
Logged
ikkeT
Jr. Member
Posts: 58
Karma: 1
Re: haproxy endpoint monitoring
«
Reply #3 on:
January 04, 2021, 04:20:06 pm »
Seems to be you need to be logged in to see the attached screenshots and json, in case you wonder what I'm talking about.
Logged
norgan
Newbie
Posts: 20
Karma: 0
Re: haproxy endpoint monitoring
«
Reply #4 on:
March 28, 2021, 01:11:10 pm »
Hey buddy, this is awesome thanks. Just trying to get this going and when imported the dash complains about telegraf not found. Changing queries fixes graphs but not showing data.
Logged
ikkeT
Jr. Member
Posts: 58
Karma: 1
Re: haproxy endpoint monitoring
«
Reply #5 on:
March 28, 2021, 10:59:26 pm »
Telegraf is the name of the influxdb database where OPNsense sends the data. You can name it as you wish, but you gotta have it. Did you set it up?
Logged
norgan
Newbie
Posts: 20
Karma: 0
Re: haproxy endpoint monitoring
«
Reply #6 on:
March 31, 2021, 09:20:54 am »
Yeah, already have a TIG stack in action. The existing influxdb db is called telegraf.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
High availability
»
haproxy endpoint monitoring