So this is what I have for my node exporter scraper. I was also trying out
DNS service Discovery which worked well with FreeIPA.
But I should probably model the snmp scraper similar to this ?
- job_name: "node"
scrape_interval: 15s
metrics_path: /metrics
# static_configs:
# - targets: [1.2.3.4:9100,5.6.7.8:9100]
file_sd_configs:
- files:
- '/etc/prometheus/node_exporter_targets.json'
# dns_sd_configs:
# - names:
# - "metrics"
# relabel_configs:
# - source_labels: ['__meta_dns_name']
# regex: 'metrics\.(.+?)\..+?\.example\.net'
# target_label: 'zone'
# replacement: '$1'
# - source_labels: ['__meta_dns_name']
# regex: 'metrics\..+?\.(.+?)\.example\.net'
# target_label: 'job'
# replacement: '$1'
On Thursday, April 2, 2020 at 1:19:10 PM UTC-5, Andrew Meyer wrote:
>
> I will have to check out how to change my config around a bit. Also it's
> not really failing for me. However I was trying to see if I could get the
> similar granularity with some of the cisco modules (Cisco ASA) using the
> fortinet/fortigate modules. I don't feel like i'm getting all the stats I
> need but I may need to include another MIB.
>
> On Thursday, April 2, 2020 at 10:50:58 AM UTC-5, Brian Candler wrote:
>>
>> On Thursday, 2 April 2020 16:25:42 UTC+1, Andrew Meyer wrote:
>>>
>>> Brian,
>>> Thanks!
>>> When setting the __param_module could you point me to an example?
>>>
>>>
>> Since you are using static_configs:
>>
>> static_configs:
>> - labels:
>> __param_module: if_mib
>> targets: [ 10.150.1.1 ]
>> - labels:
>> __param_module: if_mib_secret
>> targets: [ 10.150.1.2, 10.150.1.3 ]
>>
>> But it's better to migrate to file_sd_configs, since these can be changed
>> without having to edit prometheus.yml and without requiring a HUP to
>> prometheus. file_sd_configs points to a file, and inside the file you have
>> the same structure of groups of (labels + targets).
>>
>> It's also a good idea to include module as a *real* label, and then use
>> rewriting to copy it to __param_module, so that your metrics get properly
>> labelled.
>>
>> More complex example here
>> <https://github.com/candlerb/netbox-prometheus#targets> which you can
>> steal just what you need from.
>>
>> > Also does anyone know of a mib to yaml converter?
>>
>> Yes - the generator which comes with snmp_exporter. You still haven't
>> shown how it fails for you.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/09f5ef6f-ed12-4b12-810b-c510fec9dc10%40googlegroups.com.