[RESOLVED] Mikrotik Device / Queue Plugin for Cacti 1.1.36

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
pavelhassan
Posts: 3
Joined: Wed Mar 28, 2018 12:54 am

[RESOLVED] Mikrotik Device / Queue Plugin for Cacti 1.1.36

#1 Post by pavelhassan » Wed Mar 28, 2018 1:05 am

Hi Experts,

I have just installed a fresh cacti 1.1.36 on CentOS 7 x86 64 bit version. Its working fine so far. Problem is I cant pull graphs from Mikrotik routers in my network. I have imported Mikrotik plugin from my old version of cacti. That pulls the cpu/memory and physical interface graphs but doesnt detect any simple queue.

I need your expert advice or the perfect plugin that should work with this version of cacti.

Thanks in advance.

netniV
Cacti Guru User
Posts: 2884
Joined: Sun Aug 27, 2017 12:05 am

Re: Mikrotik device & Simple Queue Plugin for Cacti 1.1.36

#2 Post by netniV » Wed Mar 28, 2018 5:12 am

You can't use the 0.8.8 veresion of the Mikrotik plugin, you need to make sure you have the GitHub version https://github.com/cacti/plugin_mikrotik

pavelhassan
Posts: 3
Joined: Wed Mar 28, 2018 12:54 am

Re: Mikrotik device & Simple Queue Plugin for Cacti 1.1.36

#3 Post by pavelhassan » Sat Mar 31, 2018 8:41 pm

Hi,

Thanks for the advice. I need some more help on the github new plugin. I am not sure what it says in below lines.

" To import that package, you must use the Cacti 'import_package.php' CLI script. The MikroTik package is included in the 'templates' sub-directory of the MikroTik plugin." in https://github.com/cacti/plugin_mikrotik .

Can you please tell me what it means and how to do it.

Thanks in advance again.

netniV
Cacti Guru User
Posts: 2884
Joined: Sun Aug 27, 2017 12:05 am

Re: Mikrotik device & Simple Queue Plugin for Cacti 1.1.36

#4 Post by netniV » Sun Apr 01, 2018 3:43 am

You need to run from a shell

Code: Select all

cd <cacti dir>/cli
php import_package.php --filename=<cacti dir>/plugins/mikrotik/templates/MikroTik_Device.xml.gz

pavelhassan
Posts: 3
Joined: Wed Mar 28, 2018 12:54 am

Re: Mikrotik device & Simple Queue Plugin for Cacti 1.1.36

#5 Post by pavelhassan » Tue Apr 03, 2018 5:41 am

Thanks netniV,

It worked !

User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Re: [RESOLVED] Mikrotik Device / Queue Plugin for Cacti 1.1.

#6 Post by mojiro » Wed Apr 17, 2019 4:15 pm

Hello,

I am facing the same issue.
I have downloaded the latest cacti (v1.2.4) from Github and also the latest mikrotik plugin from Github.

Code: Select all

[email protected]:/var/www/html/cacti/cli# php import_package.php --filename='/var/www/html/cacti/plugins/mikrotik/templates/MikroTik_Device.xml.gz'
Read 130162 bytes of Package data
ERROR: file /var/www/html/cacti/plugins/mikrotik/templates/MikroTik_Device.xml.gz import process failed due to missing XML version
At the same time the cacti.log was:

Code: Select all

[email protected]:/var/www/html/cacti/log# cat cacti.log
2019/04/18 00:22:50 - IMPORT NOTE: Got Package Signature
2019/04/18 00:22:50 - IMPORT NOTE: File is Signed Correctly
2019/04/18 00:22:50 - IMPORT Loading Plugin Information from package
2019/04/18 00:22:50 - IMPORT Verifying each files signature
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_snmpget.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_count_oids.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_cpu.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_procs.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_mem.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_disk.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_users.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_uptime.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_health.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_wapcount.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_wrcount.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_trees.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_qcount.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/resource/script_server/mikrotik_wireless_reg.xml
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/resource/script_server/mikrotik_queues.xml
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/resource/script_server/mikrotik_trees.xml
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/resource/script_server/mikrotik_qusers.xml
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/resource/script_server/mikrotik_interfaces.xml
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_wireless_reg.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_queues.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_qtrees.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_qusers.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: plugins/mikrotik/templates/scripts/ss_mikrotik_interfaces.php
2019/04/18 00:22:50 - IMPORT NOTE: File OK: MikroTik_Device.xml
2019/04/18 00:22:50 - IMPORT Writing Files
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_snmpget.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_snmpget.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_count_oids.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_count_oids.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_cpu.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_cpu.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_procs.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_procs.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_mem.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_mem.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_disk.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_disk.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_users.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_users.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_uptime.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_uptime.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_health.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_health.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wapcount.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wapcount.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wrcount.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wrcount.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_trees.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_trees.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qcount.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qcount.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_wireless_reg.xml
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_wireless_reg.xml, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_queues.xml
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_queues.xml, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_trees.xml
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_trees.xml, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_qusers.xml
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_qusers.xml, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_interfaces.xml
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/resource/script_server/mikrotik_interfaces.xml, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wireless_reg.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_wireless_reg.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_queues.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_queues.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qtrees.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qtrees.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qusers.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_qusers.php, with Status written
2019/04/18 00:22:50 - IMPORT Writing file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_interfaces.php
2019/04/18 00:22:50 - IMPORT Write Status file: /var/www/html/cacti/plugins/mikrotik/templates/scripts/ss_mikrotik_interfaces.php, with Status written
2019/04/18 00:22:50 - IMPORT Importing XML Data for MikroTik_Device.xml
2019/04/18 00:22:50 - IMPORT ERROR: 0101 Current Cacti Version does not exist!
[...]
2019/04/18 00:22:50 - IMPORT ERROR: 0101 Current Cacti Version does not exist!
I tried to import it manually through the UI and the error was:
Sorry, we could not process your last action.

XML parse error.
XML: Cacti version does not exist.
----

Fix:

I edited the file include/global_arrays.php and added the version 1.2.4 at the end of the array $cacti_version_codes.

Code: Select all

        '1.2.1'  => '0101',
        '1.2.2'  => '0101',
        '1.2.3'  => '0102',
        '1.2.4'  => '0102',
);
[i]Born to be online![/i]

Post Reply