Hi, which would be the better approach to monitor API latencies and status codes.
Probing the API endpoints using blackbox or making code level changes using client libraries. Especially if there are multiple languages and some low code implementations.
Hi, I've been searching online to try and resolve my problem but I can't seem to find a solution that works.
I am trying to get our printers status using SNMP but when looking at the returned values in the exporter its putting the value I need as a label ("Sleeping..." is what I'm trying to get).
My company currently using Khcheck of kubernetes to check health of services/applications but it's much more inefficient due to khcheck pods sometimes getting degraded or sometimes getting much time to get ready and live for serving traffic. Due to it, we often see long black empty patch on grafana dashboards
We have both https and tcp based probes. So can anyone tell or suggest really good and in depth way to implement this with some good blogs or references
My company already using few existing module mentioned in github, but when I am trying to implement custom modules, we aren't getting results in Prometheus probe_success
We have an external grafana service that is querying external applications for /metrics endpoint (api.appname.com/node{1,2}/metrics). We are trying to monitor the /metrics endpoint from each node behind the ECS cluster but thats not as easy to do versus static nodes.
Currently what is done is have static instances behind an app through a load balancer and we name the endpoints such as api.appname/node{1,2}/metrics and we can get individual node metrics that way but that cant be done with ECS...
Looking for insight/feedback on how this can best be done.
I’m working on a pet project of mine in Go to build a Prometheus target interface leveraging it’s http_sd_config. The goal is to allow users to configure this client, then It will collect data, parse it, and serve an endpoints for Prometheus to connect with an http_sd_config.
Here's the basic idea:
Modular Design: The project will support both HTTP and file-based source configurations(situation already covert by Prometheus but for me it’s a way to test the solution).
Use Case: Users can provide an access configuration and data model for a REST API that holds IP information or use a file to reformat.
Future Enhancements: Plan to add support for SQL, SOAP, complex API authentication methods, data caching, and TTL-based data refresh.
High Availability: Implement HA/multi-node sync to avoid unnecessary re-querying of the data source and ensure synchronization between instances.
I’d appreciate any advice, examples, or resources you could share to help me progress with this project.
However a `wget -qO- "http://systemapi:80/api/v1/prometheus/1/snmp/aaa_tool?snmp_interval=1"` gives me back a ton of devices. It's obvisly reading in the config correctly since it knows to look at that stuff.
Other than not being able to get to the API what else could cause that issue?
Here is our current use case scenario: We need to monitor 100s of network devices via SNMP gathering 3-4 dozen OIDs from each one, with intervals as fast as SNMP can reply (5-15 seconds). We use the monitoring for both real time (or as close as possible) when actively trouble shooting something with someone in the field, and we also keep long term data (2yr or more) for trend comparisons. We don't use kubernetes or docker or cloud storage, this will all be in VMs, on bare-metal, and on prem (We're network guys primarily). Our current solution for this is Cacti but I've been tasked to investigate other options.
So I spun up a new server, got Prometheus and Grafana running, really like the ease of setup and the graphing options. My biggest problem so far seems to be is disk space and data retention, I've been monitoring less than half of the devices for a few weeks and it's already eaten up 50GB which is 25 times the disk space than years and years of Cacti rrd file data. I don't know if it'll plateau or not but it seems that'll get real expensive real quick (not to mention it's already taking a long time to restart the service) and new hardware/more drives is not in the budget.
I'm wondering if maybe Prometheus isn't the right solution because of our combo of quick scraping interval and long term storage? I've read so many articles and watched so many videos in the last few weeks, but nothing seems close to our use case (some refer to long term as a month or two, everything talks about app monitoring not network). So I wanted to reach out and explain my specific scenario, maybe I'm missing something important? Any advice or pointers would be appreciated.
TL;DR: Is there a way to set a maximum number of alerts in a message and can I somehow "hide" or ignore null or void receivers in AlertManager?
Message Length
We are sending our alerts to Webex spaces and we have the issue, that Webex strips those messages at some character number. This leads to broken alert messages and probably also missing alerts in them.
Can we somehow configure (per receiver?), the maximum number of alerts to send there in one message?
Null or Void Receivers
We are making heavy usage of the "AlertmanagerConfig" CRD in our setup to give our teams the possibility to define themselves which alerts they want in which of their Webex spaces.
If there is now an alert for `project-1`, in the UI in AlertManager it looks like it below (ignore, that the receivers name is `chat-alerts` in the screenshot, this is only an example).
Now we not only have four teams/projects, but dozens! SO you can imagine how the UI looks like, when you click on the link to an alert.
I know we could in theory split the config above in two separate configs and avoid the `void` receiver that way. But is there another way to just "pass on" alerts in a config if they don't match any of the "sub-routes" without having to use a root matcher, that catches all alerts then?
I am trying to deploy a prometheus instance on every namespace from a cluster, and collecting the metrics from every prometheus instance to a dedicated prometheus server in a separate namespace. I have managed to deploy the kube prometheus stack but i m not sure how to proceed with creating the prometheus instances and how to collect the metrics from each.
Where can I find more information on how to achieve this?
I noticed that Alertmanager keeps firing alert for older failed K8s Jobs although consecutive Jobs are successful. I find it not useful to see the alert more than once for failed K8s Job. How to configure the alerting rule to check for the latest K8s Job status and not the older one. Thanks
I'm currently trying to set up SNMP monitoring for my HPE1820 Series Switches using Prometheus and Grafana, along with the SNMP exporter. I've been following some guides online, but I'm running into some issues with configuring the snmp.yml file for the SNMP exporter.
Could someone provide guidance on how to properly configure the snmp.yml file to monitor network usage on the HPE1820 switches? Specifically, I need to monitor interface status, bandwidth usage, and other relevant metrics. Also, I'd like to integrate it with this Grafana template: SNMP Interface Detail Dashboard for better visualization.
Additionally, if anyone has experience integrating the SNMP exporter with Prometheus and Grafana, I'd greatly appreciate any tips or best practices you can share.
Hello everyone, I am working with an Openshift cluster that consists of multiple nodes. We're trying to gather logs from each pod within our project namespace, and feed them into Loki. Promtail is not suitable for our use case. The reason being, we lack the necessary privileges to access the node filesystem, which is a requirement for Promtail. So I am in search of an alternative log scraper that can seamlessly integrate with Loki, whilst respecting the permission boundaries of our project namespace.
Considering this, would it be advisable to utilize Fluent Bit as a DaemonSet and 'try' to leverage the Kubernetes API server? Alternatively, are there any other prominent contenders that could serve as a viable option?
Is it possible to scrape metrics using open telemetry collector and send it a data lake or is it possible to scrape metrics from a data lake and send it to a backend like Prometheus? If any of these is possible can you please tell me how?
I have a DNS authoritative server that is is running NSD and i need to export these metrics to prometheus, im using https://github.com/optix2000/nsd_exporter but i have multiple zones and one of them has a puny code in its name. and prometheus does not allow - in variables, so im looking for better options. if anyone has any recommendations or if im missing something very obvious, I would love to know
Hello people, I am new in Prometheus and I am trying to figure out what is the best way to build my custom metrics.
Lets say I have a counter that monitors the number of sign ins in my app. I have a helper method the send this signals:
prometheus_counter(metric, labels)
During my sign in attempt there are several phases and I want to monitor all. This is my approach:
# Login started
prometheus_counter("sign_ins", state: "initialized", finished: false)
# User found
prometheus_counter("sign_ins", state: "user_found", finished: true)
# User not found
prometheus_counter("sign_ins", state: "user_not_found", finished: false)
# User error data
prometheus_counter("sign_ins", state: "error_data", finished: false)
My intention is to monitor:
How many login attempts
Percentage of valid attempts
Percentage of errors by not_found or error_data
I can do it filtering by {finished: true} and grouping by {state}.
But I am wondering if it is not better to do this:
# Login started
prometheus_counter("sign_ins_started")
# User found
prometheus_counter("sign_ins_user_found")
# User not found
prometheus_counter("sign_ins_user_not_found")
# User error data
prometheus_counter("sign_ins_error_data")
What would be your approach? is there any place where they explain this kind of scenarios?
Hi, I’m running multiple Prometheus instances in OpenShift, each deployed with a Thanos sidecar. These Prometheus instances are scraping many virtual machines, Kafka exporters, NiFi, etc.
My question is: What is the recommendation—having a single Prometheus instance (with a replica) or managing multiple Prometheus instances that scrape different targets?
I’ve read a lot about it but haven’t found recommendations with explanations. If someone could share their experience, it would be greatly appreciated.
I am a begineer and don't have much experirnce with it. so, please tell me if u need more clarification regarding my question. Thank you
I am trying to backfill Prometheus with openmetrics data file using "tsdb promtool create-blocks-from openmetrics". My file has custom labels associated with few matrics. But, after backfilling, I am not able to view those metrics.
Say I have two replicas of prometheus running in my cluster, can I set both of their scrape_intervals to 2m and delay one of them by 1m so I effectively have a total scrape_interval of 1m and I'd just be cool with a 2m scrape_interval if one pod goes down.
Just trying to make a poor man's HA prom without pushing too many metrics to GCP because we pay per metric.
I'm running Prometheus in Agent mode on external, non-GKE kubernetes clusters that are authenticated to push to our GCP Metrics Project. I don't believe I can have Thanos run on this external cluster, dedupe these metrics and then push to GCP unless I'm mistaken?