What's new

Ac88u snmp grafana

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Zer0

Occasional Visitor
Hello , having a bit of trouble here , have other snmp working fine , but cant get any in data in the db , can u guys think of something im doing wrong , maybe the oid are invalid , beacause the conf i checkd as from a ac68, anyone got ac88u working witn snmp and grafana ???

My telegraf influx is working fine with that db for the synology snmp , here is the config , if you can help i realy thank you


# Configuration for telegraf agent
[agent]
interval = "30s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
logfile = ""
hostname = ""
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
urls = ["http://192.168.1.20:8086"] # required
database = "Synology" # required
retention_policy = ""
write_consistency = "any"
timeout = "5s"
###############################################################################
# INPUT PLUGINS #
###############################################################################
# Router
[[inputs.snmp]]
agents = [ "192.168.1.1" ]
interval = "60s"
timeout = "30s"
retries = 3
version = 2
community = "public"
max_repetitions = 30
name = "snmp.ac88u"
fielddrop = [ "laErrorFlag", "laErrMessage" ]
[inputs.snmp.tagdrop]
diskIODevice = [ "loop*", "ram*" ]
## System details
# System name (hostname)
[[inputs.snmp.field]]
name = "sysName"
oid = "SNMPv2-MIB::sysName.0"
is_tag = true
# System vendor OID
[[inputs.snmp.field]]
name = "sysObjectID"
oid = "SNMPv2-MIB::sysObjectID.0"
# System description
[[inputs.snmp.field]]
name = "sysDescr"
oid = "SNMPv2-MIB::sysDescr.0"
# System contact
[[inputs.snmp.field]]
name = "sysContact"
oid = "SNMPv2-MIB::sysContact.0"
# System location
[[inputs.snmp.field]]
name = "sysLocation"
oid = "SNMPv2-MIB::sysLocation.0"
## Host/System Resources
# System uptime
[[inputs.snmp.field]]
name = "sysUpTime"
oid = "HOST-RESOURCES-MIB::hrSystemUptime.0"
# Number of user sessions
[[inputs.snmp.field]]
name = "hrSystemNumUsers"
oid = "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
# Number of process contexts
[[inputs.snmp.field]]
name = "hrSystemProcesses"
oid = "HOST-RESOURCES-MIB::hrSystemProcesses.0"
# Device Listing
[[inputs.snmp.table]]
oid = "HOST-RESOURCES-MIB::hrDeviceTable"
[[inputs.snmp.table.field]]
oid = "HOST-RESOURCES-MIB::hrDeviceIndex"
is_tag = true
## Context Switches & Interrupts
# Number of interrupts processed
[[inputs.snmp.field]]
name = "ssRawInterrupts"
oid = "UCD-SNMP-MIB::ssRawInterrupts.0"
# Number of context switches
[[inputs.snmp.field]]
name = "ssRawContexts"
oid = "UCD-SNMP-MIB::ssRawContexts.0"
## Host performance metrics
# System Load Average
[[inputs.snmp.table]]
oid = "UCD-SNMP-MIB::laTable"
[[inputs.snmp.table.field]]
oid = "UCD-SNMP-MIB::laNames"
is_tag = true
## CPU inventory
# Processor listing
[[inputs.snmp.table]]
index_as_tag = true
oid = "HOST-RESOURCES-MIB::hrProcessorTable"
## CPU utilization
# Number of 'ticks' spent on user-level
[[inputs.snmp.field]]
name = "ssCpuRawUser"
oid = "UCD-SNMP-MIB::ssCpuRawUser.0"
# Number of 'ticks' spent on reduced-priority
[[inputs.snmp.field]]
name = "ssCpuRawNice"
oid = "UCD-SNMP-MIB::ssCpuRawNice.0"
# Number of 'ticks' spent on system-level
[[inputs.snmp.field]]
name = "ssCpuRawSystem"
oid = "UCD-SNMP-MIB::ssCpuRawSystem.0"
# Number of 'ticks' spent idle
[[inputs.snmp.field]]
name = "ssCpuRawIdle"
oid = "UCD-SNMP-MIB::ssCpuRawIdle.0"
# Number of 'ticks' spent waiting on I/O
[[inputs.snmp.field]]
name = "ssCpuRawWait"
oid = "UCD-SNMP-MIB::ssCpuRawWait.0"
# Number of 'ticks' spent in kernel
[[inputs.snmp.field]]
name = "ssCpuRawKernel"
oid = "UCD-SNMP-MIB::ssCpuRawKernel.0"
# Number of 'ticks' spent on hardware interrupts
[[inputs.snmp.field]]
name = "ssCpuRawInterrupt"
oid = "UCD-SNMP-MIB::ssCpuRawInterrupt.0"
# Number of 'ticks' spent on software interrupts
[[inputs.snmp.field]]
name = "ssCpuRawSoftIRQ"
oid = "UCD-SNMP-MIB::ssCpuRawSoftIRQ.0"
## System Memory (physical/virtual)
# Size of phsyical memory (RAM)
[[inputs.snmp.field]]
name = "hrMemorySize"
oid = "HOST-RESOURCES-MIB::hrMemorySize.0"
# Size of real/phys mem installed
[[inputs.snmp.field]]
name = "memTotalReal"
oid = "UCD-SNMP-MIB::memTotalReal.0"
# Size of real/phys mem unused/avail
[[inputs.snmp.field]]
name = "memAvailReal"
oid = "UCD-SNMP-MIB::memAvailReal.0"
# Total amount of mem unused/avail
[[inputs.snmp.field]]
name = "memTotalFree"
oid = "UCD-SNMP-MIB::memTotalFree.0"
# Size of mem used as shared memory
[[inputs.snmp.field]]
name = "memShared"
oid = "UCD-SNMP-MIB::memShared.0"
# Size of mem used for buffers
[[inputs.snmp.field]]
name = "memBuffer"
oid = "UCD-SNMP-MIB::memBuffer.0"
# Size of mem used for cache
[[inputs.snmp.field]]
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
##
## Block (Disk) performance
##
# System-wide blocks written
[[inputs.snmp.field]]
name = "ssIORawSent"
oid = "UCD-SNMP-MIB::ssIORawSent.0"
# Number of blocks read
[[inputs.snmp.field]]
name = "ssIORawReceived"
oid = "UCD-SNMP-MIB::ssIORawReceived.0"
# Per-device (disk) performance
[[inputs.snmp.table]]
oid = "UCD-DISKIO-MIB::diskIOTable"
[[inputs.snmp.table.field]]
oid = "UCD-DISKIO-MIB::diskIODevice"
is_tag = true
##
## Disk/Partition/Filesystem inventory & usage
##
# Storage listing
[[inputs.snmp.table]]
oid = "HOST-RESOURCES-MIB::hrStorageTable"
[[inputs.snmp.table.field]]
oid = "HOST-RESOURCES-MIB::hrStorageDescr"
is_tag = true
 
I have the AC88u and have it working with Telegraf SNMP -> Influx. I actually used the same base telegraf config that was given at the URL you mentioned in your post (it worked pretty much out of the box for me) but I then customised it quite a lot for my setup (nothing to do with any differences specific to the AC88u though)...

In your case:
(A) have you run just the [inputs.snmp] chunk through Telegraf —test? This should output the results to the command line and rule out any issues with InfluxDB.
(B) Assume you have configured the snmp server on your router with the community as “public” as per your config?
(C) You mention it is working for your synology snmp input but there is no mention of the synology target in the file above so wondering if you are using a separate config file for that and, if so, what are the differences in the influx output plugin lines?
 
I have the AC88u and have it working with Telegraf SNMP -> Influx. I actually used the same base telegraf config that was given at the URL you mentioned in your post (it worked pretty much out of the box for me) but I then customised it quite a lot for my setup (nothing to do with any differences specific to the AC88u though)...

In your case:
(A) have you run just the [inputs.snmp] chunk through Telegraf —test? This should output the results to the command line and rule out any issues with InfluxDB.
(B) Assume you have configured the snmp server on your router with the community as “public” as per your config?
(C) You mention it is working for your synology snmp input but there is no mention of the synology target in the file above so wondering if you are using a separate config file for that and, if so, what are the differences in the influx output plugin lines?


Hi @ninja88 , thanks a lot for you reply and help

A - i have not tried just the inputs.snmp , that is a good tip , im trying it out later when i am home

B - i have this configured in snmp in the router , what do u have for GET and SET ???
upload_2018-11-26_13-8-41.png



C - I have removed the last part of synology bacause it was to big to copy past ,but i used the conf for synology that was in that repo , just installed the synology mibs


Did u have to install different mibs like u do with synology ??? if so where can i find them ? ??
 

Attachments

  • upload_2018-11-26_13-0-41.png
    upload_2018-11-26_13-0-41.png
    296.8 KB · Views: 887
Hi @ninja88 , thanks a lot for you reply and help

A - i have not tried just the inputs.snmp , that is a good tip , im trying it out later when i am home

B - i have this configured in snmp in the router , what do u have for GET and SET ???
View attachment 15255


C - I have removed the last part of synology bacause it was to big to copy past ,but i used the conf for synology that was in that repo , just installed the synology mibs


Did u have to install different mibs like u do with synology ??? if so where can i find them ? ??

(A) Ok, let me know how it goes - Just google for Telegraf command line test, create a test.conf file (with just your input, no need for output) and run on the command line. To rule out Telegraf and InfluxDB completely and to test that the snmp server is working on the router, have you run a simple snmpwalk of some of the OIDs you specify in the config file?

(B) I have my community ID for GET and <blank> for SET.

(C) I didn’t have to install any additional MIBs specific to the ASUS router (all those you listed above are standard MIBs) but I did download the snmp-mibs-downloader package and ran “download-mibs” to download the latest standard MIBs set to the telegraf server.
 
(A) Ok, let me know how it goes - Just google for Telegraf command line test, create a test.conf file (with just your input, no need for output) and run on the command line. To rule out Telegraf and InfluxDB completely and to test that the snmp server is working on the router, have you run a simple snmpwalk of some of the OIDs you specify in the config file?

(B) I have my community ID for GET and <blank> for SET.

(C) I didn’t have to install any additional MIBs specific to the ASUS router (all those you listed above are standard MIBs) but I did download the snmp-mibs-downloader package and ran “download-mibs” to download the latest standard MIBs set to the telegraf server.

I think i know what im not putting right ... after changing the order of the telegraf.conf , and put the mibs of the router first , now i have data from the router , but no data from synolgy , how do u have put in the conf file multiple configurations ?? can u give an example

i have like that in botom but the second one doesnt start , is it right ???

# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
urls = ["http://192.168.1.20:8086"] # required
database = "telegraf" # required
retention_policy = ""
write_consistency = "any
timeout = "5s"



###############################################################################
# INPUT PLUGINS #
###############################################################################



# Router
[[inputs.snmp]]
agents = [ "192.168.1.1" ] - ROUTER
interval = "60s"
timeout = "30s"
retries = 3
version = 2
community = "public"
max_repetitions = 30
name = "snmp.rtn66r"
fielddrop = [ "laErrorFlag", "laErrMessage" ]
[inputs.snmp.tagdrop]
diskIODevice = [ "loop*", "ram*" ]
## System details
# System name (hostname)
[[inputs.snmp.field]]
name = "sysName"
oid = "SNMPv2-MIB::sysName.0"
is_tag = true
# System vendor OID



# Synology
[[inputs.snmp]]
agents = [ "192.168.1.20" ] - SYNOLOGY
interval = "60s"
timeout = "30s"
retries = 3
version = 2
community = "public"
max_repetitions = 30
name = "snmp.SYNO"
[[inputs.snmp.field]]
is_tag = true
name = "sysName"
oid = "RFC1213-MIB::sysName.0"
# System vendor OID
[[inputs.snmp.field]]
name = "sysObjectID"
oid = "RFC1213-MIB::sysObjectID.0"
# System description
 
Ok got it working , thanks for you help , it was a permission problem in docker had to copy the mibs to a place where it could read them and add a patch
 
Glad you got it working!

I actually now recall having a few issues with the structure and formatting of the base config from the above URL you posted so I spent some time amending the telegraf config so that there is a single snmp.input (writing to snmp.hosts.<Table Name> measurement) for all my “hosts” (servers and network switches, including the AC88u, which use the standard MIBs) and then a separate input.snmp section for all the synology specific MIBs writing to snmp.synology.<TableName>) for the synology-based hosts. Note that, for the snmp.synology.systemTable and snmp.synology.upsTable measurements, I have to specify every single OID from these synology MIBs since there is an issue with the structure of these Synology MIBs (I’ve raised this with Synology) - the same issue doesn’t exist for say the snmp.synology.raidTable or any other Synology MIBs...

The reason I did this was because (A) I noticed that some measurements were getting polluted into the wrong tables (I can’t recall which now), (B) to make the whole config the same across all hosts, (C) to make it easier to identify in the DB, the source / type of the measurement (fr example by putting name tags against each table) since the base config you used seemed more aligned to pulling a single summary table together from multiple different MIBs/OIDs.

If you're interested to see what I ended up with, I have pasted an excerpt of my config (for the “hosts” and “synology” hosts) to the following URL (any parameters specific to me are highlighted as "<XYZ>"... you can use this if you wish to compare with / amend your existing config or, if you want to use this with your host parameter settings, you have to change any Grafana dashboards/panels to read from the new table names in the DB.

Overall I’m likely collecting FAR more info than I actually need from this config currently...

https://pastebin.com/Xgd2TRtv
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top