x70b1 / telegraf-edgeos

A lightweight Telegraf distribution customized for Ubiquiti's EdgeOS.
MIT License
34 stars 3 forks source link

Feedback using EdgeRouter X SFP #4

Closed beparmentier closed 1 year ago

beparmentier commented 1 year ago

Hello,

Just a quick feedback using a EdgeRouter X SFP 6-Port

I couldn't install latest v1.24.0-1 release because of package's size so I use the version v1.23.2-1

temperature and power status are not supported on this model :

root@ubnt:~# /usr/sbin/ubnt-hal getPowerStatus
Power status is not supported on this platform

root@ubnt:~# /usr/sbin/ubnt-hal getTemp
Temperature not supported on this platform

No problem with internal plugins.

So I just deactivated temperature and power and everything works fine :

root@ubnt:~# telegraf --test --config /etc/telegraf/telegraf.conf 
2022-11-30T11:05:10Z I! Starting Telegraf 1.23.2
2022-11-30T11:05:10Z I! Loaded inputs: cpu exec (2x) mem net system
2022-11-30T11:05:10Z I! Loaded aggregators: 
2022-11-30T11:05:10Z I! Loaded processors: 
2022-11-30T11:05:10Z W! Outputs are not used in testing mode!
2022-11-30T11:05:10Z I! Tags enabled: host=ubnt
> net,host=ubnt,interface=eth0 bytes_recv=5011067686460i,bytes_sent=131113199742i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=3357495953i,packets_sent=531870232i 1669806310000000000
> net,host=ubnt,interface=switch0 bytes_recv=1960227961i,bytes_sent=5872992257i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=13004028i,packets_sent=11140089i 1669806310000000000
> net,host=ubnt,interface=eth4 bytes_recv=0i,bytes_sent=746i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=0i,packets_sent=7i 1669806310000000000
> net,host=ubnt,interface=eth1 bytes_recv=7088998892i,bytes_sent=24287610649i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=14546883i,packets_sent=28863725i 1669806310000000000
> net,host=ubnt,interface=imq0 bytes_recv=0i,bytes_sent=0i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=0i,packets_sent=0i 1669806310000000000
> net,host=ubnt,interface=eth5 bytes_recv=113153957841i,bytes_sent=10661532855i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=91619584i,packets_sent=37935282i 1669806310000000000
> net,host=ubnt,interface=itf0 bytes_recv=124984055954i,bytes_sent=125594042070i,drop_in=0i,drop_out=0i,err_in=174i,err_out=0i,packets_recv=136933650i,packets_sent=134441624i 1669806310000000000
> net,host=ubnt,interface=eth2 bytes_recv=0i,bytes_sent=746i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=0i,packets_sent=7i 1669806310000000000
> mem,host=ubnt active=141164544i,available=122605568i,available_percent=47.2890138708964,buffered=16609280i,cached=117907456i,commit_limit=129634304i,committed_as=508231680i,dirty=0i,free=11038720i,high_free=0i,high_total=0i,huge_page_size=0i,huge_pages_free=0i,huge_pages_total=0i,inactive=47341568i,low_free=11038720i,low_total=259268608i,mapped=42250240i,page_tables=1249280i,shared=13557760i,slab=20701184i,sreclaimable=7995392i,sunreclaim=12705792i,swap_cached=0i,swap_free=0i,swap_total=0i,total=259268608i,used=113713152i,used_percent=43.85920566210623,vmalloc_chunk=0i,vmalloc_total=1065345024i,vmalloc_used=0i,write_back=0i,write_back_tmp=0i 1669806310000000000
> net,host=ubnt,interface=eth3 bytes_recv=41228766032i,bytes_sent=5009477203401i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=461973068i,packets_sent=3327841411i 1669806310000000000
> net,host=ubnt,interface=eth5.100 bytes_recv=4644895020i,bytes_sent=1303289969i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=6243801i,packets_sent=5565635i 1669806310000000000
> system,host=ubnt load1=1.53,load15=1.26,load5=1.29,n_cpus=4i,n_users=1i 1669806310000000000
> system,host=ubnt uptime=1216321i 1669806310000000000
> system,host=ubnt uptime_format="14 days,  1:52" 1669806310000000000
> net,host=ubnt,interface=all icmp_inaddrmaskreps=0i,icmp_inaddrmasks=0i,icmp_incsumerrors=0i,icmp_indestunreachs=4829i,icmp_inechoreps=44i,icmp_inechos=10129i,icmp_inerrors=0i,icmp_inmsgs=15002i,icmp_inparmprobs=0i,icmp_inredirects=0i,icmp_insrcquenchs=0i,icmp_intimeexcds=0i,icmp_intimestampreps=0i,icmp_intimestamps=0i,icmp_outaddrmaskreps=0i,icmp_outaddrmasks=0i,icmp_outdestunreachs=22739i,icmp_outechoreps=10129i,icmp_outechos=92i,icmp_outerrors=0i,icmp_outmsgs=32960i,icmp_outparmprobs=0i,icmp_outredirects=0i,icmp_outsrcquenchs=0i,icmp_outtimeexcds=0i,icmp_outtimestampreps=0i,icmp_outtimestamps=0i,icmpmsg_intype0=44i,icmpmsg_intype3=4829i,icmpmsg_intype8=10129i,icmpmsg_outtype0=10129i,icmpmsg_outtype3=22739i,icmpmsg_outtype8=92i,ip_defaultttl=64i,ip_forwarding=1i,ip_forwdatagrams=11475686i,ip_fragcreates=439i,ip_fragfails=0i,ip_fragoks=219i,ip_inaddrerrors=0i,ip_indelivers=5643166i,ip_indiscards=0i,ip_inhdrerrors=0i,ip_inreceives=18709256i,ip_inunknownprotos=0i,ip_outdiscards=0i,ip_outnoroutes=4i,ip_outrequests=16961174i,ip_reasmfails=1i,ip_reasmoks=326i,ip_reasmreqds=654i,ip_reasmtimeout=1i,tcp_activeopens=59i,tcp_attemptfails=2i,tcp_currestab=7i,tcp_estabresets=617i,tcp_incsumerrors=0i,tcp_inerrs=0i,tcp_insegs=727579i,tcp_maxconn=-1i,tcp_outrsts=54i,tcp_outsegs=682266i,tcp_passiveopens=1605i,tcp_retranssegs=142i,tcp_rtoalgorithm=1i,tcp_rtomax=120000i,tcp_rtomin=200i,udp_ignoredmulti=76822i,udp_incsumerrors=0i,udp_indatagrams=4818779i,udp_inerrors=0i,udp_noports=4988i,udp_outdatagrams=4828887i,udp_rcvbuferrors=0i,udp_sndbuferrors=0i,udplite_ignoredmulti=0i,udplite_incsumerrors=0i,udplite_indatagrams=0i,udplite_inerrors=0i,udplite_noports=0i,udplite_outdatagrams=0i,udplite_rcvbuferrors=0i,udplite_sndbuferrors=0i 1669806310000000000
> cpu,cpu=cpu-total,host=ubnt usage_active=56.650246290502736,usage_guest=0,usage_guest_nice=0,usage_idle=43.349753709497264,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0.49261083715989656,usage_steal=0,usage_system=19.70443348603744,usage_user=36.45320194893629 1669806311000000000
> edgeos_interface,host=ubnt,interface=eth1,type=ethernet alias="Local",speed=100,state=0 1669806312000000000
> edgeos_interface,host=ubnt,interface=lo,type=other speed=0,state=3 1669806312000000000
> edgeos_interface,host=ubnt,interface=itf0,type=other speed=0,state=3 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth4,type=ethernet alias="Local",speed=10,state=1 1669806312000000000
> edgeos_interface,host=ubnt,interface=switch0,type=switch alias="Local",speed=0,state=0 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth2,type=ethernet alias="Local",speed=10,state=1 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth0,type=ethernet alias="Local",speed=1000,state=0 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth5.100,type=vif alias="Fibre_ByTel_v100",speed=1000,state=0 1669806312000000000
> edgeos_interface,host=ubnt,interface=imq0,type=other speed=0,state=3 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth5,type=ethernet speed=1000,state=0 1669806312000000000
> edgeos_interface,host=ubnt,interface=eth3,type=ethernet alias="Local",speed=1000,state=0 1669806312000000000
> edgeos_firmware,host=ubnt availiable="v2.0.9-hotfix.4",model="EdgeRouter X SFP 6-Port",running="v2.0.9-hotfix.4",serial="74ACB9A52C0D",upgrade=0 1669806312000000000

Here my telegraf.conf


[agent]
  hostname = "ubnt"

  interval = "1m"

  debug = false
  quiet = false
  logtarget = "stderr"

[[outputs.influxdb_v2]]
  urls = ["http://10.130.17.188:8086"]
  organization = "xxx"
  token = "xxx"
  bucket = "network"

[[inputs.cpu]]
  percpu = false
  report_active = true

[[inputs.system]]

[[inputs.mem]]

[[inputs.net]]

[[inputs.exec]]
  command = "sh /usr/lib/telegraf/edgeos.sh --interfaces"
  data_format = "influx"

[[inputs.exec]]
  command = "sh /usr/lib/telegraf/edgeos.sh --firmware"
  data_format = "influx"
  interval = "24h"

Thanks.

Regards, Ben

x70b1 commented 1 year ago

I will update the info table. Or maybe you want to add a pull request? Its up to you.

The other thing: file size You are right, the binary is now ~ 150 mb instead of ~ 18 mb. I will take a look at this. Thanks for this!

x70b1 commented 1 year ago

I have added the ER-X-SFP.

A fixed release will be availiable soon to too.