[Solved] MikroTik templating-problem with voltage an wireless clients DCIs
-
Hello, I'm sorry for asking simple question again.
Ive done MikroTik template(in attachment) with following apply rule:
return $node->driver == "MIKROTIK";Almost everything working. But when template was applied on rb without voltage sensor(OID: .1.3.6.1.4.1.14988.1.1.3.8.0) NetXMS generate alarm. Ive tried to use instance discovery in template and script, but Im doing something wrong and cant skip applying this particular DCI for host without sensor.
SNMP Out for hosts with and witout sensor:
snmpwalk -v2c -c maincommunity 192.168.x.x .1.3.6.1.4.1.14988.1.1.3.8
iso.3.6.1.4.1.14988.1.1.3.8.0 = INTEGER: 257snmpwalk -v2c -c maincommunity 192.168.x.x .1.3.6.1.4.1.14988.1.1.3.8
iso.3.6.1.4.1.14988.1.1.3.8 = No Such Object available on this agent at this OIDI know that isn't NetXMS, but main lack of knowlege about NXSL. I ask that you kindly provide a single example of filter that stops of creating DCI on node without voltage sensor.
Second problem is about MT's oid for number of wireless client's conected( .1.3.6.1.4.1.14988.1.1.1.4). When I do MIB walk value is correct, but when I create DCI(in template or direct on host) is always "UNSUPPORTED".
Than You in advance.
-
New post only for refresh purpose.
Ive tried instance discovery with following code:
transport = CreateSNMPTransport($node);
if (transport == null)
{
return false;
}
value = SNMPGetValue(transport, ".1.3.6.1.4.1.14988.1.1.3.8.0");
if (value == null)
{
return false;
}
else
{
return true;
}Type : Script
Parameter: .1.3.6.1.4.1.14988.1.1.3.8No results
-
Hi,
simplest way is to define instance discovery DCI with SNMP based discovery:
- use parameter name .1.3.6.1.4.1.14988.1.1.3.8.{instance}
- set origin to SNMP
- set instance discovery method to "SNMP Walk - OIDs"
- set base SNMP OID to .1.3.6.1.4.1.14988.1.1.3.8
- leave filter script empty
Such instance discovery DCI will create single instance .1.3.6.1.4.1.14988.1.1.3.8.0 when it is supported and will not create anything when it is not supported.
As for .1.3.6.1.4.1.14988.1.1.1.4 - you should use .1.3.6.1.4.1.14988.1.1.1.4.0 as parameter name (you can see full OID in walk result).
Best regards,
Victor -
Thak You Sir.
It is working. Before answer Ive resolved problem other way(file without 001 ending i attachments).
Ive attached my MikroTik templates(file with 001 is corrected as Mr Victor suggested to deal with that voltage OID) for everyone.Template's DCI's:
-CPU usage
-MEM Usage
-Voltage
-Count of Wireless Clients
-Speed/Packets of all interfaces(interfaces with "vl" and "br" in names are not included)
-RouterOS and Firmware version
-Board Name
-Ping
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login