[prometheus-users] OctetString automatic override?

2023-08-02 Thread 'Elliott Balsley' via Prometheus Users
I'm trying to monitor an Adder AIM server. Most of the metrics are defined as OCTET STRING in the mib, but tools like snmpwalk display it automatically as readable text. With snmp_exporter they all appear as hex values. I found that I can fix this by overriding the type to DisplayString. But

Re: [prometheus-users] How to graph SNMP tables?

2023-08-05 Thread 'Elliott Balsley' via Prometheus Users
atus="overload"} 0 > ...etc > > EnumAsInfo will apply a single label which changes (therefore, if it ever > changes, the timeseries will change; only use this for labels which are > essentially static). Alternatively, you could represent enums as a plain > integer stored

Re: [prometheus-users] How to graph SNMP tables?

2023-08-06 Thread 'Elliott Balsley' via Prometheus Users
t;2004A0241038"} > > This is technically possible in the exporter/snmp.yml config, but the > generator doesn't have a syntax to make this. This is something we could > support, but it would require some code changes to add a "only lookup for > this metric" feature. &g

[prometheus-users] Concatenate metrics into single string

2023-08-11 Thread 'Elliott Balsley' via Prometheus Users
I have an SNMP device that returns its firmware version as three separate metrics like this: firmwareBuildVersion 0 firmwareMajorVersion 9 firmwareMinorVersion 6 Is there a way to combine this into a single string like "0.9.6" ? -- You received this message because you are subscribed to the Goo

[prometheus-users] Docker snmp-generator outdated

2023-08-13 Thread 'Elliott Balsley' via Prometheus Users
I think a Dockerized version of snmp-generator would be helpful to simplify installation, but the last several versions are missing from Docker Hub, as compared with snmp-exporter. Is there a reason they are not kept in parity? Based on the release dates, I would guess that snmp-generator:latest

[prometheus-users] Best practices for SNMP string values

2023-08-15 Thread 'Elliott Balsley' via Prometheus Users
As I'm evaluating Prometheus for SNMP monitoring, it seems like it's not well suited for tracking string values. Is that correct, or can anyone share how it's working for them? As an example, I'm monitoring a Dolby CP850 and one of the metrics is returned like this: cp850BitstreamFormat{cp850Bits

Re: [prometheus-users] Best practices for SNMP string values

2023-08-16 Thread 'Elliott Balsley' via Prometheus Users
p if you posted a link to the MIB, as it would help to > understand the underlying data. > > On Wed, Aug 16, 2023 at 7:06 AM 'Elliott Balsley' via Prometheus Users < > prometheus-users@googlegroups.com> wrote: > >> As I'm evaluating Prometheus for SNMP mon

[prometheus-users] SNMP lookup not working

2023-11-20 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I'm trying to configure snmp-exporter with a PDU, using a lookup to label each outlet with its human-readable name (outletName) by referencing its outletIndex. But when I try to do this, the outletName label is an empty string. Is there something wrong with my generator config? Example: *

Re: [prometheus-users] SNMP lookup not working

2023-11-20 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
: ' - 1.3.6.1.4.1.1418.6.5.1.6' indexes: - labelname: outletIndex type: gauge lookups: - labels: - outletIndex labelname: outletName oid: 1.3.6.1.4.1.1718.3.2.3.1.3 type: DisplayString On Mon, Nov 20, 2023 at 6:41 PM 'Elliott Balsley' via Prometheus Users < prometheus-users@

Re: [prometheus-users] SNMP lookup not working

2023-11-20 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
RS pre module in > the generator. This way you can put the conflicting MIBs in different dirs > and still have one config. > > On Tue, Nov 21, 2023 at 4:18 AM 'Elliott Balsley' via Prometheus Users < > prometheus-users@googlegroups.com> wrote: > >> Aha! I fo

[prometheus-users] probe_success VS up

2023-11-27 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I've recently started monitoring a large fleet of hardware devices using a combination of blackbox, snmp, node, and json exporters. I started out using the *up* metric, but I noticed when using blackbox ping, *up* is *always* 1 even when the device is offline. So I plan to switch to *probe_succ

[prometheus-users] Multi-target exporter with Netbox

2023-12-13 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I've just started looking at Netbox as a way to store "inventory" for Prometheus using this plugin: https://github.com/FlxPeters/netbox-plugin-prometheus-sd The documentation is a bit light and I'm wondering if anyone can share a good example of how to use the multi-target exporter pattern. My

Re: [prometheus-users] Re: Multi-target exporter with Netbox

2023-12-14 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Thanks Brian, this is helpful. It seems like the "active" flag would be a nice way to take devices out of monitoring for long-term outages. I'm curious what naming convention you use for devices in Netbox. Since device names are required to be unique within a site, I'm thinking about some short "

[prometheus-users] Prometheus exporters in Grafana Agent

2024-01-11 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I noticed Grafana Agent flow mode has many of the popular Prometheus exporters built in. https://grafana.com/docs/agent/latest/flow/reference/components/prometheus.exporter.snmp/ Unfortunately, these blocks require that you hard code the list of targets in the config.river file, so there is no way

[prometheus-users] Maximum targets for exporter

2024-01-11 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I'm curious if anyone has experimented to find out how many targets can reasonably be scraped by a single instance of blackbox and snmp exporters. I know Prometheus itself can handle tens of thousands of targets, but I'm wondering at what point it becomes necessary to split up the scraping. I'll fi

Re: [prometheus-users] Maximum targets for exporter

2024-01-16 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Thanks, it sounds promising on the Prometheus side. I’ve actually found a performance issue with the Prometheus plug-in for Netbox that I was using to provide the HTTP discovery. It hammers the Netbox database with excessive queries and takes over 30 seconds to respond with just 2000 targets. So, i

Re: [prometheus-users] Maximum targets for exporter

2024-01-16 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Even if that plugin can be optimized for performance, it still feels like an inefficient approach. Users will add and modify devices in Netbox, for example marking them off-line to remove from monitoring. These changes are infrequent, and I want Prometheus to respond as fast as possible. So I’m thi

Re: [prometheus-users] Prometheus exporters in Grafana Agent

2024-01-18 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
. On Thu, Jan 11, 2024 at 01:14 Ben Kochie wrote: > The Grafana agent isn't really meant for complex/large setups. If you have > a large/dynamic target list you're probably better off just running normal > Prometheus and exporters. > > On Thu, Jan 11, 2024 at 10:09

[prometheus-users] Building multi-target exporter in Python

2025-02-04 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I’d like to build a multi-target exporter, similar to the blackbox exporter, where it takes an IP address as part of the URL path and uses that to collect metrics from hardware devices. This would be my first time writing a Prometheus exporter. From the Python client examples, I’ve created a Custom

[prometheus-users] How to use prometheus_client describe method?

2025-04-05 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I'm working on a custom exporter, using the prometheus_client python library. I've read the documentation about auto_describe but it's not clear. With auto_describe=True, the collect() method runs twice on each scrape. This is bad because it puts extra load on the target device. I can fix thi

[prometheus-users] Renumber SNMP indexes using snmp_exporter?

2025-04-05 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
If an SNMP table uses indexes 0 thru 7, is there a way to renumber it 1 thru 8? For example I'm using this lookup to add outlet labels to a PDU: lookups: - source_indexes: [outletIndex] lookup: outletName drop_source_indexes: false The resulting metric looks like this:

Re: [prometheus-users] How to handle SNMP TruthValue type?

2025-04-05 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
:24:56 UTC Ben Kochie wrote: >> >>> I added some numeric features recently for this specific case. >>> >>> Here's an example: >>> >>> https://github.com/prometheus/snmp_exporter/blob/15269c2a5788db885178a8f98de28e7ce10ed0a9/generator/generat

[prometheus-users] How to handle SNMP TruthValue type?

2025-03-26 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Some SNMP devices return boolean values as a TruthValue textual convention, where 1 means true and 2 means false. This is confusing to me, because with most other devices I usually use 0 to mean false. I tried using regex to change 2 to 0 (shown below) but this didn't work. How do other folks

Re: [prometheus-users] How to handle SNMP TruthValue type?

2025-03-27 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
dler' via Prometheus Users < >>> prometheus-users@googlegroups.com> wrote: >>> >>>> Shouldn't that be under the "hrDevice" MIB rather than the "mikrotik" >>>> MIB? >>>> >>>> On Thur

[prometheus-users] Why does SNMP exporter show uppercase MAC?

2025-03-25 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Why does SNMP exporter show MAC addresses as uppercase? For example, using the default snmp.yml with if_mib module I get this: ifPhysAddress{ifAlias="",ifDescr="eth0",ifIndex="2",ifName="eth0",ifPhysAddress="3C:EC:EF:3C:B1:5E"} 1 Net-snmp tools show these values as lowercase, as does the snmp-ex

[prometheus-users] Extracting multiple metrics from SNMP string

2025-03-26 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I have an SNMP device that returns a value like this: DOLBY-CP850-MIB::cp850MeterLevels.0 = STRING: "00 00 00 00 00 00 00 00 00 00" This string represents the volume level of 10 separate audio channels, so I would like to break it apart and record it as 10 metrics. I previously had this working

[prometheus-users] Re: Why does SNMP exporter show uppercase MAC?

2025-03-25 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I figured out how to change this with relabel_configs so it's just a curiosity. On Tuesday, March 25, 2025 at 6:28:38 PM UTC-7 Elliott Balsley wrote: Why does SNMP exporter show MAC addresses as uppercase? For example, using the default snmp.yml with if_mib module I get this: ifPhysAddress{if

[prometheus-users] Drop metrics based on value?

2025-03-31 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Many SNMP devices return bogus numbers for sensors that don't exist. For example a Dataprobe iBoot PDU shows a temperature value of 9 celsius if you don't buy the optional temperature sensor. Is it possible to configure the prometheus scrape to drop metrics with a certain value like this?

[prometheus-users] Re: Extracting multiple metrics from SNMP string

2025-04-01 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
Thanks, that relabel config works perfectly! On Wednesday, March 26, 2025 at 2:06:57 AM UTC-7 Brian Candler wrote: > I don't think the exporter can do that, although it sounds like a good > idea to me (i.e. to be able to set a label rather than mangle the metric > name). > > Possibly you could

[prometheus-users] Customizing labels with SNMP Exporter

2025-04-15 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I have an SNMP device which returns a table of sensors, including columns for left fan and right fan speed. After applying a lookup in the generator, the metrics look like this: unit_fan_left{ledStatusUnitPortId="1",ledStatusUnitUnitId="1"} 1450 unit_fan_right{ledStatusUnitPortId="1",ledStatusUn

[prometheus-users] Re: Customizing labels with SNMP Exporter

2025-04-16 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I was hoping to do this in the exporter, but otherwise I can do it easily enough with a relabel config on the scrape. On Tuesday, April 15, 2025 at 6:20:59 AM UTC-7 Elliott Balsley wrote: > I have an SNMP device which returns a table of sensors, including columns > for left fan and right fan s

[prometheus-users] IEEE-754 numbers in SNMP

2025-05-06 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I have a new device that reports its SNMP values as hex byte strings encoded using IEEE-754. For example the value "423ce042" means 47.219. This was proposed as a textual convention in RFC6340 but it’s the first time I’ve come across it. https://www.rfc-editor.org/rfc/rfc6340 As far as I can tell

[prometheus-users] Must SNMP table filtering be so verbose?

2025-04-15 Thread &#x27;Elliott Balsley&#x27; via Prometheus Users
I've spent over 2 hours reading the documentation and examples about how to use static and dynamic filters in the SNMP Exporter. I find this concept very confusing, and I think I think I finally understand it. It would have been more clear to include this statement in the readme: *Filters cann