[Suggestions] New Mikrotik Template
Moderators: Developers, Moderators
Re: [Suggestions] New Mikrotik Template
i`m here too.
Ready to test.
Ready to test.
-
- Posts: 1
- Joined: Mon Apr 14, 2014 5:15 pm
Re: [Suggestions] New Mikrotik Template
Good morning, I use cacti to monitor other tools, however Mikroik need to monitor my equipment, and all equipment mesu use RouterOS 5.x, would you provide this new template?
We are an institute of research and conservation located in the state of Amazonas Brazil Teffe.
www.mamiraua.org.br
We are an institute of research and conservation located in the state of Amazonas Brazil Teffe.
www.mamiraua.org.br
Re: [Suggestions] New Mikrotik Template
Any working Mikrotik template with cacti 0.8.8b ?
Re: [Suggestions] New Mikrotik Template
Is this work fine with 0.8.8b ?
Thanks
Thanks
Re: [Suggestions] New Mikrotik Template
Where can I find updated template? I'm currently in process of upgrading my cacti installation to a new version. Also wanted to update your template.
Re: [Suggestions] New Mikrotik Template
Is this template still under active development?
Re: [Suggestions] New Mikrotik Template
any news on the template?
Re: [Suggestions] New Mikrotik Template
Hello, I want to know HOW GRAPH QUEUE TREE ON MIKROTIK? I search too much but anything.... Can someone help me? Please I need
Re: [Suggestions] New Mikrotik Template
hello,
I have a problem, my cacti 0.8.8.b version
my problem is mikrotik signal strength. I can not see signal in graph. The other signal is works.
Verbose Query log:
+ Running data query [10].
+ Found type = '4' [Script Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for num of indexes 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 num_indexes'
+ Found number of indexes: Interfaces: Array
+ Found number of indexes: (
+ Found number of indexes: ["ether1"] => 1
+ Found number of indexes: ["ether2"] => 2
+ Found number of indexes: ["ether3"] => 3
+ Found number of indexes: ["5GHz_V"] => 6
+ Found number of indexes: ["5GHz_AP_Szektor"] => 7
+ Found number of indexes: ["5GHz_H"] => 8
+ Found number of indexes: [""] => 14
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: SSID: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => iso.3.6.1.4.1.14988.1.1.1.1.1.5.8
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => STRING: "PC_DUTEP_H"
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: CMAC: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.0.14.142.7.171.205.7
+ Found number of indexes: [1] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.0.21.109.104.132.223.8
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => INTEGER: -62
+ Found number of indexes: [1] => INTEGER: -57
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Interface database: Array
+ Found number of indexes: (
+ Found number of indexes: [8] => Array
+ Found number of indexes: (
+ Found number of indexes: [ssid] => PC_DUTEP_H
+ Found number of indexes: [soid] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 3.0.21.109.104.132.223
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [ifIndex] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 00:00:15:6D:68:84:DF
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [7] => Array
+ Found number of indexes: (
+ Found number of indexes: [soid] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 3.0.14.142.7.171.205
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [ifIndex] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 00:00:0E:8E:07:AB:CD
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Executing script for list of indexes 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 index' Index Count: 2
+ Found index: 00:00:0E:8E:07:AB:CD
+ Found index: 00:00:15:6D:68:84:DF
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 query ifName'
+ Found item [ifName='"5GHz_AP_Szektor"'] index: 00:00:0E:8E:07:AB:CD
+ Found item [ifName='"5GHz_H"'] index: 00:00:15:6D:68:84:DF
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 query ifIndex'
+ Found item [ifIndex='00:00:0E:8E:07:AB:CD'] index: 00:00:0E:8E:07:AB:CD
+ Found item [ifIndex='00:00:15:6D:68:84:DF'] index: 00:00:15:6D:68:84:DF
Cacti log files:
014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.17'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.17'
'
What is problem with the SNMP WALK or other?
I thank from help
I have a problem, my cacti 0.8.8.b version
my problem is mikrotik signal strength. I can not see signal in graph. The other signal is works.
Verbose Query log:
+ Running data query [10].
+ Found type = '4' [Script Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for num of indexes 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 num_indexes'
+ Found number of indexes: Interfaces: Array
+ Found number of indexes: (
+ Found number of indexes: ["ether1"] => 1
+ Found number of indexes: ["ether2"] => 2
+ Found number of indexes: ["ether3"] => 3
+ Found number of indexes: ["5GHz_V"] => 6
+ Found number of indexes: ["5GHz_AP_Szektor"] => 7
+ Found number of indexes: ["5GHz_H"] => 8
+ Found number of indexes: [""] => 14
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: SSID: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => iso.3.6.1.4.1.14988.1.1.1.1.1.5.8
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => STRING: "PC_DUTEP_H"
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: CMAC: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.0.14.142.7.171.205.7
+ Found number of indexes: [1] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.0.21.109.104.132.223.8
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Array
+ Found number of indexes: (
+ Found number of indexes: [0] => INTEGER: -62
+ Found number of indexes: [1] => INTEGER: -57
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: Interface database: Array
+ Found number of indexes: (
+ Found number of indexes: [8] => Array
+ Found number of indexes: (
+ Found number of indexes: [ssid] => PC_DUTEP_H
+ Found number of indexes: [soid] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 3.0.21.109.104.132.223
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [ifIndex] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 00:00:15:6D:68:84:DF
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [7] => Array
+ Found number of indexes: (
+ Found number of indexes: [soid] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 3.0.14.142.7.171.205
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: [ifIndex] => Array
+ Found number of indexes: (
+ Found number of indexes: [1] => 00:00:0E:8E:07:AB:CD
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Found number of indexes:
+ Found number of indexes: )
+ Executing script for list of indexes 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 index' Index Count: 2
+ Found index: 00:00:0E:8E:07:AB:CD
+ Found index: 00:00:15:6D:68:84:DF
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 query ifName'
+ Found item [ifName='"5GHz_AP_Szektor"'] index: 00:00:0E:8E:07:AB:CD
+ Found item [ifName='"5GHz_H"'] index: 00:00:15:6D:68:84:DF
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php pcpc 172.16.10.58 query ifIndex'
+ Found item [ifIndex='00:00:0E:8E:07:AB:CD'] index: 00:00:0E:8E:07:AB:CD
+ Found item [ifIndex='00:00:15:6D:68:84:DF'] index: 00:00:15:6D:68:84:DF
Cacti log files:
014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.20'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.19'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.20.18', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.18'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.46', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.17'
11/11/2014 04:40:09 PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'172.16.10.51', and OID:'.1.3.6.1.4.1.14988.1.1.5.1.1.17'
'
What is problem with the SNMP WALK or other?
I thank from help
-
- Posts: 1
- Joined: Thu Aug 14, 2014 3:31 am
Re: [Suggestions] New Mikrotik Template
Where is the final XML file?:-)
-
- Posts: 4
- Joined: Thu Jan 15, 2015 7:33 am
Re: [Suggestions] New Mikrotik Template
@mojiro - Thank you for the Template, however I have a problem that i do not know how to fix. All files are imported as instructed however it does not seem to be able to index any of the data queries, and when i go to the new graphs menu it states [Error in data query]
Any body have some ideas ?
Any body have some ideas ?
Re: [Suggestions] New Mikrotik Template
Hello,
Can anyone post the template?
Thank you.
Can anyone post the template?
Thank you.
Re: [Suggestions] New Mikrotik Template
Hi to everyone, I'm very new in this Cacti world, and its awesome.
Does anyone was able to run the "wireless client" or the "Wireless registration table" in the Cacti v0.8.8b?, because I get the "Error in Data query" and when I run in Debug mode don't see any error:
Debugg Get Wireless Information
+ Running data query [14].
+ Found type = '4' [Script Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wirelless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for num of indexes '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D num_indexes'
+ Executing script for list of indexes '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D index' Index Count: 0
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query index'
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query name'
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query cmac'
I used the templates mentioned in http://forums.cacti.net/viewtopic.php?f=12&t=17936, but did not let it working
Cacti V 0.8.8b
Ubuntu 17.4
Apache2
Thanks.
Does anyone was able to run the "wireless client" or the "Wireless registration table" in the Cacti v0.8.8b?, because I get the "Error in Data query" and when I run in Debug mode don't see any error:
Debugg Get Wireless Information
+ Running data query [14].
+ Found type = '4' [Script Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wirelless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for num of indexes '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D num_indexes'
+ Executing script for list of indexes '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D index' Index Count: 0
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query index'
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query name'
+ Executing script query '/mnt/hd01/php/bin/php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php A.B.C.D query cmac'
I used the templates mentioned in http://forums.cacti.net/viewtopic.php?f=12&t=17936, but did not let it working
Cacti V 0.8.8b
Ubuntu 17.4
Apache2
Thanks.
Re: [Suggestions] New Mikrotik Template
Sorry for the long post, but myself and some others seem to have fixed it.
It revolves around mikrotik_wireless_interfaces.php, which every template seems to call at some stage.
Backstory, it appears the original script was built on a work around due to the php call snmprealwalk() having a bug; https://bugs.php.net/bug.php?id=51336
They fixed it in PHP 5.4; but it seems most people are running 5.3 and older with this script.
What it meant is the script, when parsing for clients, would incorrectly workout the MAC address, causing it to get an extra paid of leading 00's on the MAC address (which of course makes the MAC invalid). This would then throw the entire script off.
I've tested this on Cacti 0.8.8a, 0.8.8b and 0.8.8c, all with PHP 5.5 (Ubuntu 14.04 LTS), as well as separately as a script on a few other servers.
So the working script should output:
But what is happening is this:
Notice most things off by one, causing everything misread SNMP OIDs and thus extra digits in the MAC Address.
(You can prove this to yourself by running the following command in the cacti/scripts directory: php mikrotik_wireless_interfaces.php <SNMP Community> <Host> )
The fix? For each refernce of 'iso', replace it with .1 to restore the OID correctly.
After Line 77
Add this
So Line 77,78,79 end up like this
Hopefully I've done enough testing to make sure it works, but my outputs are back to what they should be!
You will need to go through your devices and 'Reload Associated Query' on Data Query [Mikrotik - Wireless - Registration Table], which will update the MAC address for each client. (Alternatively, just delete the device altogether in Cacti and re-add it).
It's a fix that should fix it for a while, but if the OP wants to update the script entirely still that's welcomed
Enjoy!
It revolves around mikrotik_wireless_interfaces.php, which every template seems to call at some stage.
Backstory, it appears the original script was built on a work around due to the php call snmprealwalk() having a bug; https://bugs.php.net/bug.php?id=51336
They fixed it in PHP 5.4; but it seems most people are running 5.3 and older with this script.
What it meant is the script, when parsing for clients, would incorrectly workout the MAC address, causing it to get an extra paid of leading 00's on the MAC address (which of course makes the MAC invalid). This would then throw the entire script off.
I've tested this on Cacti 0.8.8a, 0.8.8b and 0.8.8c, all with PHP 5.5 (Ubuntu 14.04 LTS), as well as separately as a script on a few other servers.
So the working script should output:
Code: Select all
Interfaces: Array
(
["lo"] => 1
["eth0"] => 2
["eth1"] => 3
["wifi0"] => 4
["ath0"] => 5
["eth0.40"] => 6
["br0"] => 7
)
SSID: Array
(
)
Array
(
)
CMAC: Array
(
[0] => .1.3.6.1.4.1.14988.1.1.1.2.1.3.220.159.219.64.86.181.5
[1] => .1.3.6.1.4.1.14988.1.1.1.2.1.3.220.159.219.76.76.149.5
)
Array
(
[0] => INTEGER: -68
[1] => INTEGER: -71
)
Interface database: Array
(
[5] => Array
(
[soid] => Array
(
[1] => .220.159.219.64.86.181
[2] => .220.159.219.76.76.149
)
[ifIndex] => Array
(
[1] => DC:9F:DB:40:56:B5
[2] => DC:9F:DB:4C:4C:95
)
)
)
Code: Select all
Interfaces: Array
(
["lo"] => 1
["eth0"] => 2
["eth1"] => 3
["wifi0"] => 4
["ath0"] => 5
["eth0.40"] => 6
["br0"] => 7
)
SSID:
CMAC: Array
(
[0] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.220.159.219.64.86.181.5
[1] => iso.3.6.1.4.1.14988.1.1.1.2.1.3.220.159.219.76.76.149.5
)
Array
(
[0] => INTEGER: -68
[1] => INTEGER: -71
)
Interface database: Array
(
[5] => Array
(
[soid] => Array
(
[1] => 3.220.159.219.64.86.181
[2] => 3.220.159.219.76.76.149
)
[ifIndex] => Array
(
[1] => 00:DC:9F:DB:40:56:B5
[2] => 00:DC:9F:DB:4C:4C:95
)
)
)
(You can prove this to yourself by running the following command in the cacti/scripts directory: php mikrotik_wireless_interfaces.php <SNMP Community> <Host> )
The fix? For each refernce of 'iso', replace it with .1 to restore the OID correctly.
After Line 77
Code: Select all
$cmac_mib = array_keys($cmac_info);
Code: Select all
foreach($cmac_mib as &$m) $m = str_replace('iso', '.1', $m);
Code: Select all
$cmac_mib = array_keys($cmac_info);
foreach($cmac_mib as &$m) $m = str_replace('iso', '.1', $m);
$cmac_val = array_values($cmac_info);
You will need to go through your devices and 'Reload Associated Query' on Data Query [Mikrotik - Wireless - Registration Table], which will update the MAC address for each client. (Alternatively, just delete the device altogether in Cacti and re-add it).
It's a fix that should fix it for a while, but if the OP wants to update the script entirely still that's welcomed
Enjoy!
Who is online
Users browsing this forum: No registered users and 2 guests