82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
# Global tags (optional)
|
||
[global_tags]
|
||
env = "lab"
|
||
|
||
[agent]
|
||
interval = "10s"
|
||
round_interval = true
|
||
metric_batch_size = 1000
|
||
metric_buffer_limit = 10000
|
||
collection_jitter = "0s"
|
||
flush_interval = "10s"
|
||
flush_jitter = "0s"
|
||
precision = ""
|
||
debug = false
|
||
omit_hostname = false
|
||
|
||
###############################################################################
|
||
# OUTPUTS
|
||
###############################################################################
|
||
|
||
[[outputs.influxdb]]
|
||
urls = ["http://influxdb:8086"]
|
||
database = "telegraf"
|
||
username = "telegraf"
|
||
password = "telegrafpass"
|
||
retention_policy = ""
|
||
write_consistency = "any"
|
||
timeout = "5s"
|
||
|
||
###############################################################################
|
||
# INPUT: Timed pings (latency)
|
||
###############################################################################
|
||
|
||
[[inputs.ping]]
|
||
## Targets you want to monitor – adjust these to your gear
|
||
urls = [
|
||
"172.0.0.196",
|
||
"172.0.0.197",
|
||
"172.0.0.198",
|
||
"172.0.0.199",
|
||
"8.8.8.8",
|
||
"google.com"
|
||
]
|
||
|
||
## How many echo requests per collection interval
|
||
count = 4
|
||
|
||
## How often to send the pings *within* each collection
|
||
ping_interval = 1.0
|
||
|
||
## Per-ping timeout in seconds
|
||
timeout = 1.0
|
||
|
||
## Use native ping (requires NET_RAW capability)
|
||
method = "native"
|
||
privileged = true
|
||
|
||
## Optional: tag name for the target URL/IP
|
||
# ip_ttl = 64
|
||
|
||
###############################################################################
|
||
# INPUT: SNMP polling
|
||
###############################################################################
|
||
|
||
[[inputs.snmp]]
|
||
agents = [ "udp://172.0.0.199:161" ]
|
||
version = 2
|
||
community = "public"
|
||
name = "mikrotik"
|
||
|
||
# Tell gosmi where to find the MIBs
|
||
path = ["/usr/share/snmp/mibs"]
|
||
|
||
# Example using textual names now:
|
||
[[inputs.snmp.field]]
|
||
name = "mtxrInterfaceStatsTxBytes"
|
||
oid = "MIKROTIK-MIB::mtxrInterfaceStatsTxBytes"
|
||
|
||
[[inputs.snmp.field]]
|
||
name = "mtxrInterfaceStatsRxBytes"
|
||
oid = "MIKROTIK-MIB::mtxrInterfaceStatsRxBytes"
|