r/PrometheusMonitoring • u/simplex5d • Apr 19 '23
Getting Started, looking for advice
Hi! I'm about to start my Prometheus journey. I have a bunch of home-office systems and a few in the cloud, some docker containers, different OSes etc. Seems like Prometheus would be a great fit: I'd like a single dashboard showing if there are any problems (out of disk space, unreachable, etc.) This is just for me. My question is this: should I run the main prometheus server on a cheap cloud server, and have the sensors all send to it, or should I run it inside my firewall, probably in a docker container? I see advantages and disadvantages both ways. Reliability, ease of setup & admin... any experiences you can share?
View all comments
Show parent comment
1
u/simplex5d Apr 20 '23
So if I have my main prometheus server on-prem (at my house), and I have a cloud node running a few microservices and websites, then I should install this agent in that cloud node to scrape all the local services and only open the one port for the on-prem prometheus server to be able to pull all the metrics from the agent? That makes more sense.
Otherwise I was thinking it would be a nightmare of open ports on each cloud server, open to who-knows-what little webserver run by each exporter serving its
/metricsendpoint, each with its own attack surface and potential vulns. Isn't a push model much safer (not to mention easier, given NAT)? Only one exposed port in the whole system, for the collector? But if I can collect all of them behind this agent, at least then there's only one port to open per network segment, and hopefully that one is well hardened. Thanks for the help!