Hello,
I have been testing using Telegraf as a sFlow collector. Originally I was testing with Telegraf’s inputs.sflow going to InfluxDB and using Grafana to show the metrics, and this was working no problems. However, our team uses Prometheus in stead of InfluxDB so we tried to change the outputs. configuration to point to prometheus. When we did this, we do not see any sflow metrics when we scrape from http://telegraf.ip:9273/metrics and we didn’t see anything in Prometheus either.
I then read that sflow plugin is deprecated, and to use netflow instead, so we set that up to be an sflow v5 collector and listen on the same sflow port (6343) and I can see netflow metrics now when we access http://telegraf.ip:9273, however only a few things show up. However, if I look at influxdb, there are WAY more metrics and tags.
Here is my /etc/prometheus/prometheus.yml:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'telegraf-sflow'
static_configs:
- targets: ['localhost:9273']
My telegraf.conf is the following:
[agent]
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = "0s"
# [[outputs.influxdb]]
[[outputs.prometheus_client]]
listen = ":9273"
path = "/metrics"
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
core_tags = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.netflow]]
service_address = "udp://:6343"
protocol = "sflow v5"
# [[inputs.sflow]]
# service_address = "udp://:6343"
When I had influxDB and sflow enabled in my telegraf.conf, I was able to see sflow metrics in the influxdb and I could create queries against it in Grafana. However when I tried to do the same with Prometheus, there are now sflow metrics, which is why we moved to netflow and I could see those.
I’m curious as to why I couldn’t see any sflow metrics in Prometheus, which I feel I should have been able to see those. Also, when testing with Netflow and InfluxDB, I could see a lot of metrics, but when moved to Prometheus, there are only 8.
I’m stuck at the moment trying to figure out how to do this. Any help would be greatly appreciated.
Thanks
