Skip to content

Instantly share code, notes, and snippets.

# HELP jnxBgpM2PrefixInPrefixesAccepted The number of prefixes for a peer that are installed in the Adj-Ribs-In and are eligible to become active in the Loc-Rib. - 1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8
# TYPE jnxBgpM2PrefixInPrefixesAccepted gauge
jnxBgpM2PrefixInPrefixesAccepted{jnxBgpM2PeerIndex="0",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 963
jnxBgpM2PrefixInPrefixesAccepted{jnxBgpM2PeerIndex="11",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 21
jnxBgpM2PrefixInPrefixesAccepted{jnxBgpM2PeerIndex="13",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 21
jnxBgpM2PrefixInPrefixesAccepted{jnxBgpM2PeerIndex="3",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 970
jnxBgpM2PrefixInPrefixesAccepted{jnxBgpM2PeerIndex="8",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 970
# HELP jnxBgpM2PeerIndex This value is a unique index for the remote peer entry in the jnxBgpM2PeerTable - 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14
# TYPE jnxBgpM2PeerIndex gauge
Jan 16 15:20:49 stag-prom01 prometheus: level=info ts=2019-01-16T15:20:49.148459848Z caller=main.go:631 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
Jan 16 15:21:48 stag-prom01 prometheus: level=info ts=2019-01-16T15:21:48.991383802Z caller=main.go:657 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml
Jan 16 15:21:48 stag-prom01 prometheus: level=info ts=2019-01-16T15:21:48.991398458Z caller=main.go:631 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
Jan 16 15:21:49 stag-prom01 prometheus: level=info ts=2019-01-16T15:21:48.995314439Z caller=main.go:657 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml
Jan 16 15:27:47 stag-prom01 prometheus: level=info ts=2019-01-16T15:27:47.888364359Z caller=main.go:631 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
Jan 16 15:29:49 stag-prom01 prometheus: level=info ts=2019-01-16T15:29:49.236325279Z caller=main.go:657 msg="Comp
static_configs:
- targets:
- 'https://stag-prom01.bos.example.com:443'
- 'https://stag-prom02.bos.example.com:443'
- 'https://stag-prom03.dfw.example.com:443'
- 'https://stag-prom04.dfw.example.com:443'
relabel_configs:
- source_labels: [__address__]
regex: '^https://[\w\-]+\.([\w\-]+)\.'
target_label: location
inhibit_rules:
- source_match_re:
replica: '^.*'
target_match_re:
replica: '^.*'
equal: ['instance', 'alertname', 'severity']
@britcey
britcey / gist:91a912c28123960a180ac42547050665
Created March 20, 2018 16:13
labels for prometheus targets
- job_name: 'ping'
scrape_interval: 10s
scrape_timeout: 5s
metrics_path: /probe
params:
module: [icmp_ipv4]
static_configs:
- targets:
- lab.example.com;dev1;192.168.1.1
- lab.example.com;kvm;192.168.16.1
oid min max avg
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonState (1.3.6.1.4.1.2636.3.52.1.2.3.1.14) 43.604573 106.098009 47.1666516654867
EtherLike-MIB::dot3StatsFCSErrors (1.3.6.1.2.1.10.7.2.1.3) 54.978294 995.167751 597.218319337143
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCurrentFlowSession (1.3.6.1.4.1.2636.3.39.1.12.1.1.1.6) 133.089871 546.70543 146.672816476106
JUNIPER-IF-MIB::ifOut1SecPkts (1.3.6.1.4.1.2636.3.3.1.1.6) 89.765429 992.658339 204.010975616314
RFC1213-MIB::ifOutErrors (1.3.6.1.2.1.2.2.1.20) 81.191123 923.976113 177.27412486598
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalGwAddrType (1.3.6.1.4.1.2636.3.52.1.1.2.1.5) 46.306736 120.659796 54.6715760902655
IF-MIB::ifAlias (1.3.6.1.2.1.31.1.1.1.18) 89.889402 926.800501 121.957226546729
RFC1213-MIB::ifInUnknownProtos (1.3.6.1.2.1.2.2.1.15) 89.000086 949.688733 223.213924806452
RFC1213-MIB::ifMtu (1.3.6.1.2.1.2.2.1.4) 80.942778 991.19613 118.087057754902
#!/usr/bin/env ruby
# use snmptranslate to lookup OID if there's no comment after an existing numeric OID
def translate_oid(oid)
@cache ||= {}
@cache[oid] ||= `snmptranslate -Os -mALL #{oid}`
end
file = 'generator.yml.j2'
juniper:
auth:
community: {{ community_strings.neteng }}
lookups:
- old_index: ifIndex
new_index: ifDescr
- old_index: dot3StatsIndex
new_index: ifDescr
walk: [
gepp:
auth:
community: mycommunitystring
walk: [1.3.6.1.4.1.xxx]
@britcey
britcey / gist:7892775
Created December 10, 2013 15:46
rsyslog config to share Nagios logs through a Merlin cluster
$umask 0000
$FileCreateMode 0644
$DirCreateMode 0755
# for debugging
# $template HostLogs,"/var/tmp/rsyslog/%fromhost-ip%.log"
# *.* ?HostLogs
$template NagiosLogs,"/usr/local/nagios/var/cluster_logs/nagios-%$YEAR%-%$MONTH%-%$DAY%.log"
# date-unixtimestamp was introduced in the 6.x release of rsyslog