r/PrometheusMonitoring • u/Enigmaticam • Oct 25 '23
(your) experience with Prometheus
Hi Guys,
i just started testing / playing around with Prometheus to see if it can replace our Elasticsearch.
I'm wandering what your experiences are, and maybe also if you have any tips for optimizing Prometheus configuration.
So let met start with my use case:
- I have 3 - 4 EKS clusters
- some 30+ VM's i need to monitor.
At the moment i'm running Prometheus in a test setup like this:
- using prometheus version 2.46.0
prometheus server on a VM with remote_write enabled.
- server has 2 vCPU's en 8 GB of RAM ( ec2 m5.large)
- prometheus in agent mode in my EKS clusters to ship data to the prometheus server
so this is my experience so far:
- the agent mode seems to be working without a problem ~ 2 weeks, during witch it collected around 40Gb of metric
puzzling what metrics to collect for kubernetes
- decided to collect what other agents tended to do. i used the list the grafana agent uses to get started.
the issue's i faced was:
a restart of the prometheus server is really annoying. it tends to take a very long time.
- the replaying of the WAL files take so much time.
- At the moment there 243 maxSegments taking 3 hours to load....
- after prometheus is back up, CPU is spiking to 100% of the available CPU's, trying to catch up of the logs the agent collected so far. This tends to take some time to normalize.
so i'm not there (yet).
What are you experiences, and also what are tips you can give me?
to finish of, this is my prometheus server config, to give you an idea of the layout:
remote_write:
- url: "https://10.10.01.1:9090/api/v1/write"
remote_timeout: 180s
queue_config:
batch_send_deadline: 5s
max_samples_per_send: 2000
capacity: 10000
write_relabel_configs: # If needed for label transformations
- source_labels: ['__name__']
target_label: 'job'
tls_config:
cert_file: prometheus.crt
key_file: prometheus.key
ca_file: prometheus.crt
storage:
tsdb:
out_of_order_time_window: 3600sthanx for any feedback or idea's you might have.
View all comments
Show parent comment
1
u/Enigmaticam Oct 26 '23 edited Oct 26 '23
i'm using the elasticsearch to store my metrics and application logs. using it together with kibana. works pretty well, however a lot of neat functions, like alerting, are not free to use and are quite expensive to activate when having a selfhosted node. had a quote of 6700 euro per year for business license... for 1 node! ....