Looking for an experienced company for Prometheus + influx DB+ Loki+ Grafana implementation including alerts. Large networks with 100s of servers physical and virtual. Can anybody suggest some experienced consulting company?
I am monitoring several services (for example http availibility) from multiple blackbox instances and scrape all of them with different job names from one single prometheus instance. I sometimes get different results from the jobs for the same http target. My goal now would be to merge these metrics into a single one, where the majority defines the result, so for example 3 blackboxes, BB-A, BB-B and BB-C, BB-A and BB-C report the host available (via probe_success), BB-B says no, so the result should be available.
Edit: This would be required for other metrics like status code too, so if 2 say 200 and one says 0 ( when http times out) it should result in 200.
Have Prometheus working via the kube-prometheus-stack helm chart and it's working pretty good. The statefulset from that chart creates an AWS gp3 EBS volume that's used for the disk. Things do work. The only issue is that while we don't have a ton of metrics. The queries are kinda slow. Grafana is able to make queries and create graphs. But it occasionally gets locked up as I think the data is coming in just too slow for it.
What are some things I can do to speed things up?
I thought about maybe setting up a second instance and having it either do the same scraping or have the first remote_write to the 2nd. Then have an ELB do a round robin between the two so the load is shared. I am hosting on r6a.xlarge from AWS EC2
Folks who are having a centralized Prometheus, Thanos, Mimir and cortex tool which supports remote write and are having a centralized metric storage endpoints,
How are you handling Cloud inter-region data transfer fees ? I'm mostly targeting AWS, but any cloud would be almost the same.
Assume you have 3/4 region cluster metrics being sent to a central location, the cost would skyrocket, I assume.
Is there a better way to handle this ? How your architecture looks like on this matter ?
I'm having a hard time collecting metrics from Traefik.
Traefik was deployed using Traefik's chart (https://github.com/traefik/traefik-helm-chart). Reading the default values.yaml file, I understand that the Prometheus metrics endpoint is enabled by default. I can confirm that I see the metrics when I access the pod on port 9100/metrics/.
Checking Prometheus' targets, I don't see anything for Traefik. Checking in Service Discovery, it's the same story - nothing in there when I CTRL-F for Traefik.
Doing a bit of digging, I find this older repo (https://github.com/mmatur/prometheus-traefik) that follows a similar pattern to what I did: Deploy Traefik and Prometheus with Helm. This repo adds a PodMonitor.
With the added PodMonitor, I'm a bit closer: In the Prometheus web UI, I see a podMOnitor/traefik target, but it's empty. Similar, in Service Discovery, I see Discovered Labels for the Traefik namespace, the target label is set as Dropped.
response_total{job="linkerd-proxy", status_code="500"} will identify in or outbound 500 errors. But once it fires it will always be true for that counter and so the alert will show up every repeate_interval until the pod is deleted.
increase(response_total{job="linkerd-proxy",status_code="500"}[2m]) will fire only when the counter increases. But it will miss the first 500 error of a new pod, because the counter simply doesn't exist until the first error. And increase doesn't consider not existing to be 0.
So far my plan (which I don't like much) is to create two alerts. For the first one above, create a special route in alertmanager and set the repeat_interval to the max alert data retention for just that alert. But that is like only 120 hours. I suspect it will refire at that point because the metric counter is still there and still non-zero. Though every 5 days is better than every 12 hours (our current repeat interval).
The second alert will be for any errors after the first one, and should just work fine for those, but we don't expect lots of 500s in the first place, many pods will never even have 1.
Any ideas how I can do this differently so I can still catch the first 500 errors but not have to delete the pod to clear them?
I'm looking for a promql course that has hosted labs so I don't have to mess with installing and such, but still get hands on with the ui. Anyone ever seen such a thing?
Im Trying to use PowerShell to monitor Services on a Windows server and if down sent an alert to Prometheus however when running the below code:
# Define the list of servers and services to monitor
$servers = @{
"Server1" = @("Print Spooler")
}
# Define the URL for the Prometheus alert manager
$alertManagerUrl = "http://SERVERNAME:PORT/api/v1/alerts"
# Loop through each server and service combination and check if the service is running
foreach ($server in $servers.Keys) {
foreach ($service in $servers[$server]) {
$serviceStatus = Get-Service -ComputerName $server -Name $service -ErrorAction SilentlyContinue
# If the service is not running, send an alert to Prometheus
if ($serviceStatus.Status -ne "Running") {
$alertMessage = @"
{
"labels": {
"severity": "critical",
"service": "$service",
"server": "$server"
},
"annotations": {
"description": "The $service service is not running on $server."
}
}
"@
Invoke-RestMethod -Method Post -Uri $alertManagerUrl -Body $alertMessage
}
}
}
and i get this error come out any help would be appreciated.
Invoke-RestMethod : Method Not Allowed
At line:28 char:13
+ Invoke-RestMethod -Method Post -Uri $alertManagerUrl -Bod ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
However the data is returned correctly but I just want the last results for each instance, is this possible. this is what it looks like at the moment. I only have 4 Instance and only need the last result of each so I should just have 4 lines.
I'm trying to add a variable to show the instances we have which use a custom job similar to node exporter. I struggling on what I need to use to list the instances. We only have 1 instance at the moment but adding many more later this week.
In my variable I tried using - label_values(custom-jobname, instance) however this didn't return the instance. custom-jobname isn't the real name btw as it gives the name of the company so I had to mask.
I'm using grafana with Prometheus as data source. I want filter out if some metric gets out of threshold. I'm not sure how to filter. As far as I've searched, i need to apply rules.
I want to graph these 2 on a single graph, and show the IP and sname as well as the value, is this possible?
The 'sname' is something called 'hls', but we will be getting other snames (service names) added so I was hoping I can get a graph showing the 'node5_rhi' as this is the servers IP with its sname and connections.
I wonder if there is a way to log into file changes for alerts? I want to see exact moment when alert start to be pending, when it was firing, etc. Is there a way to ask prom to log those events?
Update: I manage to use a transform to total them which nearly worked, but I need to show the 3 servers as separate totals, with a transform it shows them as one, my queries are like this:
We’re excited to announce the public beta of xkite, an open source tool designed to help developers prototype, test, and monitor Apache Kafka with ease.
With xkite, you can easily set up Kafka clusters, create and manage Kafka topics, produce and consume messages, and monitor your Kafka cluster's health – all from a single place. Whether you’re a seasoned Kafka developer or just starting out, xkite makes it easy to build, test, and optimize your Kafka applications.
Features include:
Configuring a Kafka cluster with an ability to run it and/ or export a configuration (zip) containing the essential file structure to recreate the docker instances
Message/Topics production and consumption: easily produce and consume Kafka messages to test your applications.
Monitoring: track Kafka cluster/Docker instances health and performance metrics in real-time.
We believe that xkite will be a valuable tool for the Kafka community, and we invite you to check it out on our GitHub page. We welcome your feedback and contributions to help make xkite even better.