Made some progress

OMD[internet]:~$ check_mk --checks mikrotik_queue --debug -I 192.168.251.2
   Running snmpbulkwalk -v2c -c 'snmpviewserver' -m '' -M '' -Cc -OQ -OU -On 
-Ot 192.168.251.2 .1.3.6.1.4.1.14988.1.1.2.1.1.2.1
   Running snmpbulkwalk -v2c -c 'snmpviewserver' -m '' -M '' -Cc -OQ -OU -On 
-Ot 192.168.251.2 .1.3.6.1.4.1.14988.1.1.2.1.1.8.1
   Running snmpbulkwalk -v2c -c 'snmpviewserver' -m '' -M '' -Cc -OQ -OU -On 
-Ot 192.168.251.2 .1.3.6.1.4.1.14988.1.1.2.1.1.9.1
[['QueueTest', '755992', '0']]

QueueName|ByteIN|BytesOut
---


#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-

def inventory_mikrotik_queue(info):
   # Debug: lets see how the data we get looks like
   print info
   return []

def check_mikrotik_queue(item, params, info):
   return (3, "UNKNOWN - not yet implemented")


check_info["mikrotik_queue"] = {
    "check_function"        : check_mikrotik_queue,
    "inventory_function"    : inventory_mikrotik_queue,
    "service_description"   : "Queue %s",
    "has_perfdata"          : True,
    "snmp_scan_function"    : lambda oid: 
oid(".1.3.6.1.4.1.14988.1.1.2.1.1.2.*"),
    "snmp_info"             : ( ".1.3.6.1.4.1.14988.1.1.2.1.1", [ "2.1", "8.1", 
"9.1",] )
}

What kinda output i need so check_mk can display Queue Name and graph 
ByteIn/Out?


________________________________
De: checkmk-en <checkmk-en-boun...@lists.mathias-kettner.de> em nome de Yves 
Pires Da Silva <yves_pi...@hotmail.com>
Enviado: terça-feira, 8 de agosto de 2017 10:56
Para: checkmk-en@lists.mathias-kettner.de
Assunto: [Check_mk (english)] check for mikrotik queues

I trying to monitor mikrotik(routerOS) queues Bytes-In and Bytes-Out, each 
queue have its own name

Listing all queues

root@nagios:~# snmpwalk -v2c -c snmpviewserver 192.168.251.2 
.1.3.6.1.4.1.14988.1.1.2.1.1.2
iso.3.6.1.4.1.14988.1.1.2.1.1.2.1 = STRING: "Teste"
iso.3.6.1.4.1.14988.1.1.2.1.1.2.2 = STRING: "3"
iso.3.6.1.4.1.14988.1.1.2.1.1.2.3 = STRING: "4"
....
iso.3.6.1.4.1.14988.1.1.2.1.1.2.251 = STRING: "252"
iso.3.6.1.4.1.14988.1.1.2.1.1.2.252 = STRING: "253"
iso.3.6.1.4.1.14988.1.1.2.1.1.2.253 = STRING: "254"


Queue

root@nagios:~# snmpwalk -v2c -c snmpviewserver 192.168.251.2 
.1.3.6.1.4.1.14988.1.1.2.1.1.2.1
iso.3.6.1.4.1.14988.1.1.2.1.1.2.1 = STRING: "Teste"

Queue BytesIN

root@nagios:~# snmpwalk -v2c -c snmpviewserver 192.168.251.2 
.1.3.6.1.4.1.14988.1.1.2.1.1.8.1
iso.3.6.1.4.1.14988.1.1.2.1.1.8.1 = Counter64: 727396

Queue Bytes-Out

root@nagios:~# snmpwalk -v2c -c snmpviewserver 192.168.251.2 
.1.3.6.1.4.1.14988.1.1.2.1.1.9.1
iso.3.6.1.4.1.14988.1.1.2.1.1.9.1 = Counter64: 0


I made few simple checks to monitor temps, signal strength, but this one is 
trickier since check_mk should create new service for each queue and monitor 
perf bytes-in/bytes-out, i tried to use if-64 as template but no luck.







_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to