Cacti / plugin_mikrotik

Mikrotik Plugin for Cacti
GNU General Public License v2.0
60 stars 24 forks source link

Data Queries is not indexed #68

Closed coder-binary1 closed 1 year ago

coder-binary1 commented 1 year ago

I install the latest cacti 1.2.23 on a fresh ubuntu 22.04.

Then I install the Mikrotik plugin and the Mikrotik through API.

**the Graph Templates are indexed and start graphing but the Data Queries are not indexed.

image

**And on the graph creation page, I found this permission error.

image

I need assistance from you to solve this issue.

TheWitness commented 1 year ago

You have to set the API Username and Password for each device, and then Enable Data Collection and Frequencies from Console > Configuration > Settings > MicroTik. After that, within a few minutes, you should be able to Re-Index the device.

TheWitness commented 1 year ago

image

and

image

coder-binary1 commented 1 year ago

Everything was same as you suggest, but it didn't work,

image

coder-binary1 commented 1 year ago

@TheWitness is there any solution for this issue?

skywalker-znz commented 1 year ago

Same issue here, Cacti 1.2.23 on a fresh Ubuntu 22.04, earlier was on Centos 7. Thank you.

TheWitness commented 1 year ago

In 1.2.23, you can import these two from the GUI Console > Import/Export > Import Package. Try that.

MikroTik_Switch_SWOS.xml.gz MikroTik_Device.xml.gz

skywalker-znz commented 1 year ago

@TheWitness I just tried that, same results. Its either a bug or some steps I am missing.

empty

TheWitness commented 1 year ago

Run this command:

select * from plugin_mikrotik_interfaces;
TheWitness commented 1 year ago

This might be better:

 select * from plugin_mikrotik_interfaces where TxBytes>0 LIMIT 2\G
TheWitness commented 1 year ago

That way you can see the forest from the tree's. Then, in the Cacti.log you should find these entries:

image

skywalker-znz commented 1 year ago

Hi @TheWitness where do I run this command, select * from plugin_mikrotik_interfaces where TxBytes>0 LIMIT 2\G

TheWitness commented 1 year ago

From MySQL command line.

TheWitness commented 1 year ago

Note though that my cacti.log says I've got 26 interfaces updated every minute.

skywalker-znz commented 1 year ago

MariaDB [cacti]> select from plugin_mikrotik_interfaces where TxBytes>0 LIMIT 2\G Empty set (0.001 sec) MariaDB [cacti]> select from plugin_mikrotik_interfaces; Empty set (0.001 sec)

I don't have any devices on this install, just 1 for testing, I dont see any mikrotik as I cannot graph any interfaces.

skywalker-znz commented 1 year ago

empty 2

TheWitness commented 1 year ago

What about your Cacti log?

TheWitness commented 1 year ago

Switch to low until your Cacti log looks like the one I posted.

skywalker-znz commented 1 year ago

When i go to Mikrotik tab, I dont see any device, but I see graphs on graphs tab, Should it not show the devices on mikrotik tab?

skywalker-znz commented 1 year ago

mikrotik

TheWitness commented 1 year ago

Why don't you answer my previous question?

TheWitness commented 1 year ago

I'm going to close this knowing now what is going on. I see that you posted on the forums as well. Let's continue the discussion there.

skywalker-znz commented 1 year ago

Thank you, I have been going round and round on this one. :)

coder-binary1 commented 1 year ago

Here is my output

MariaDB [cacti]> select * from plugin_mikrotik_interfaces; 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2023-01-04 04:30:07 | 1 | +---------+----------+------------------------------------+----------------+-------------+------------+----------+------------+------------+------------+-------------+--------------+-------------+-----------+-------------+---------+-------------+-------------+--------------+------------+------------+-----------+-------------+---------------+-------------+----------------+----------+---------+----------------+-------------+------------+--------+-----------+------------+------------+-------------+--------------+-------------+-----------+-------------+---------+-------------+------------+-------------+---------------+-----------------+-----------------+--------------+------------+-----------------+------------------+----------------+--------+----------+-------------+-----------+------------+------------+--------------+---------------+-----------+--------------+---------------+---------------+----------------+-----------------+----------------+--------------+----------------+------------+----------------+----------------+-----------------+---------------+---------------+--------------+----------------+------------------+----------------+-------------------+-------------+-----------+------------+--------------+---------------+-----------+--------------+---------------+---------------+----------------+-----------------+----------------+--------------+----------------+------------+----------------+---------------+----------------+------------------+--------------------+--------------------+-----------------+---------------+--------------------+---------------------+-------------------+-----------+-------------+----------------+--------------+---------------+----------------+---------------+----------------+------------+---------------+----------------+----------------+-----------------+------------------+-----------------+---------------+-----------------+-------------+-----------------+-----------------+------------------+----------------+----------------+---------------+-----------------+-------------------+-----------------+--------------------+--------------+------------+----------------+---------------+----------------+------------+---------------+----------------+----------------+-----------------+------------------+-----------------+---------------+-----------------+-------------+-----------------+----------------+-----------------+-------------------+---------------------+---------------------+------------------+----------------+---------------------+----------------------+--------------------+------------+--------------+-----------------+---------------+----------------+---------------------+---------+ 348 rows in set (0.003 sec

MariaDB [cacti]> select * from plugin_mikrotik_interfaces where TxBytes>0 LIMIT 2\G 1. row host_id: 3 index: 1 name: ETHER1 RxBytes: 4468945834459 RxPackets: 3996935894 RxTooShort: 0 RxTo64: 0 Rx65to127: 0 Rx128to255: 0 Rx256to511: 0 Rx512to1023: 0 Rx1024to1518: 0 Rx1519toMax: 0 RxTooLong: 0 RxBroadcast: 3129158 RxPause: 0 RxMulticast: 588443 RxFCFSError: 0 RxAlignError: 0 RxFragment: 0 RxOverflow: 0 RxControl: 0 RxUnknownOp: 0 RxLengthError: 0 RxCodeError: 0 RxCarrierError: 0 RxJabber: 0 RxDrop: 749868 TxBytes: 560932778324 TxPackets: 2411573575 TxTooShort: 0 TxTo64: 0 Tx65to127: 0 Tx128to255: 0 Tx256to511: 0 Tx512to1023: 0 Tx1024to1518: 0 Tx1519toMax: 0 TxTooLong: 0 TxBroadcast: 3167189 TxPause: 0 TxMulticast: 0 TxUnderrun: 0 TxCollision: 0 TxExCollision: 0 TxMultCollision: 0 TxSingCollision: 0 TxExDeferred: 0 TxDeferred: 0 TxLateCollision: 0 TxTotalCollision: 0 TxPauseHonored: 0 TxDrop: 0 TxJabber: 0 TxFCFSError: 0 TxControl: 0 TxFragment: 0 curRxBytes: 13707973 curRxPackets: 10928 curRxTooShort: 0 curRxTo64: 0 curRx65to127: 0 curRx128to255: 0 curRx256to511: 0 curRx512to1023: 0 curRx1024to1518: 0 curRx1519toMax: 0 curRxTooLong: 0 curRxBroadcast: 25 curRxPause: 0 curRxMulticast: 3 curRxFCFSError: 0 curRxAlignError: 0 curRxFragment: 0 curRxOverflow: 0 curRxControl: 0 curRxUnknownOp: 0 curRxLengthError: 0 curRxCodeError: 0 curRxCarrierError: 0 curRxJabber: 0 curRxDrop: 0 curTxBytes: 816197 curTxPackets: 3511 curTxTooShort: 0 curTxTo64: 0 curTx65to127: 0 curTx128to255: 0 curTx256to511: 0 curTx512to1023: 0 curTx1024to1518: 0 curTx1519toMax: 0 curTxTooLong: 0 curTxBroadcast: 25 curTxPause: 0 curTxMulticast: 0 curTxUnderrun: 0 curTxCollision: 0 curTxExCollision: 0 curTxMultCollision: 0 curTxSingCollision: 0 curTxExDeferred: 0 curTxDeferred: 0 curTxLateCollision: 0 curTxTotalCollision: 0 curTxPauseHonored: 0 curTxDrop: 0 curTxJabber: 0 curTxFCFSError: 0 curTxControl: 0 curTxFragment: 0 prevRxBytes: 4468945834459 prevRxPackets: 3996935894 prevRxTooShort: 0 prevRxTo64: 0 prevRx65to127: 0 prevRx128to255: 0 prevRx256to511: 0 prevRx512to1023: 0 prevRx1024to1518: 0 prevRx1519toMax: 0 prevRxTooLong: 0 prevRxBroadcast: 3129158 prevRxPause: 0 prevRxMulticast: 588443 prevRxFCFSError: 0 prevRxAlignError: 0 prevRxFragment: 0 prevRxOverflow: 0 prevRxControl: 0 prevRxUnknownOp: 0 prevRxLengthError: 0 prevRxCodeError: 0 prevRxCarrierError: 0 prevRxJabber: 0 prevRxDrop: 749868 prevTxBytes: 560932778324 prevTxPackets: 2411573575 prevTxTooShort: 0 prevTxTo64: 0 prevTx65to127: 0 prevTx128to255: 0 prevTx256to511: 0 prevTx512to1023: 0 prevTx1024to1518: 0 prevTx1519toMax: 0 prevTxTooLong: 0 prevTxBroadcast: 3167189 prevTxPause: 0 prevTxMulticast: 0 prevTxUnderrun: 0 prevTxCollision: 0 prevTxExCollision: 0 prevTxMultCollision: 0 prevTxSingCollision: 0 prevTxExDeferred: 0 prevTxDeferred: 0 prevTxLateCollision: 0 prevTxTotalCollision: 0 prevTxPauseHonored: 0 prevTxDrop: 0 prevTxJabber: 0 prevTxFCFSError: 0 prevTxControl: 0 prevTxFragment: 0 last_seen: 2023-01-04 04:30:07 present: 1 2. row host_id: 3 index: 4 name: ETHER4 RxBytes: 1986681419228 RxPackets: 8106074953 RxTooShort: 0 RxTo64: 0 Rx65to127: 0 Rx128to255: 0 Rx256to511: 0 Rx512to1023: 0 Rx1024to1518: 0 Rx1519toMax: 0 RxTooLong: 0 RxBroadcast: 5725845 RxPause: 0 RxMulticast: 862453 RxFCFSError: 0 RxAlignError: 0 RxFragment: 0 RxOverflow: 0 RxControl: 0 RxUnknownOp: 0 RxLengthError: 0 RxCodeError: 0 RxCarrierError: 0 RxJabber: 0 RxDrop: 976936 TxBytes: 27269348090920 TxPackets: 22599328040 TxTooShort: 0 TxTo64: 0 Tx65to127: 0 Tx128to255: 0 Tx256to511: 0 Tx512to1023: 0 Tx1024to1518: 0 Tx1519toMax: 0 TxTooLong: 0 TxBroadcast: 9786720 TxPause: 0 TxMulticast: 1071520 TxUnderrun: 0 TxCollision: 0 TxExCollision: 0 TxMultCollision: 0 TxSingCollision: 0 TxExDeferred: 0 TxDeferred: 0 TxLateCollision: 0 TxTotalCollision: 0 TxPauseHonored: 0 TxDrop: 0 TxJabber: 0 TxFCFSError: 0 TxControl: 0 TxFragment: 0 curRxBytes: 1396064 curRxPackets: 6565 curRxTooShort: 0 curRxTo64: 0 curRx65to127: 0 curRx128to255: 0 curRx256to511: 0 curRx512to1023: 0 curRx1024to1518: 0 curRx1519toMax: 0 curRxTooLong: 0 curRxBroadcast: 28 curRxPause: 0 curRxMulticast: 4 curRxFCFSError: 0 curRxAlignError: 0 curRxFragment: 0 curRxOverflow: 0 curRxControl: 0 curRxUnknownOp: 0 curRxLengthError: 0 curRxCodeError: 0 curRxCarrierError: 0 curRxJabber: 0 curRxDrop: 0 curTxBytes: 24860212 curTxPackets: 22656 curTxTooShort: 0 curTxTo64: 0 curTx65to127: 0 curTx128to255: 0 curTx256to511: 0 curTx512to1023: 0 curTx1024to1518: 0 curTx1519toMax: 0 curTxTooLong: 0 curTxBroadcast: 45 curTxPause: 0 curTxMulticast: 5 curTxUnderrun: 0 curTxCollision: 0 curTxExCollision: 0 curTxMultCollision: 0 curTxSingCollision: 0 curTxExDeferred: 0 curTxDeferred: 0 curTxLateCollision: 0 curTxTotalCollision: 0 curTxPauseHonored: 0 curTxDrop: 0 curTxJabber: 0 curTxFCFSError: 0 curTxControl: 0 curTxFragment: 0 prevRxBytes: 1986681419228 prevRxPackets: 8106074953 prevRxTooShort: 0 prevRxTo64: 0 prevRx65to127: 0 prevRx128to255: 0 prevRx256to511: 0 prevRx512to1023: 0 prevRx1024to1518: 0 prevRx1519toMax: 0 prevRxTooLong: 0 prevRxBroadcast: 5725845 prevRxPause: 0 prevRxMulticast: 862453 prevRxFCFSError: 0 prevRxAlignError: 0 prevRxFragment: 0 prevRxOverflow: 0 prevRxControl: 0 prevRxUnknownOp: 0 prevRxLengthError: 0 prevRxCodeError: 0 prevRxCarrierError: 0 prevRxJabber: 0 prevRxDrop: 976936 prevTxBytes: 27269348090920 prevTxPackets: 22599328040 prevTxTooShort: 0 prevTxTo64: 0 prevTx65to127: 0 prevTx128to255: 0 prevTx256to511: 0 prevTx512to1023: 0 prevTx1024to1518: 0 prevTx1519toMax: 0 prevTxTooLong: 0 prevTxBroadcast: 9786720 prevTxPause: 0 prevTxMulticast: 1071520 prevTxUnderrun: 0 prevTxCollision: 0 prevTxExCollision: 0 prevTxMultCollision: 0 prevTxSingCollision: 0 prevTxExDeferred: 0 prevTxDeferred: 0 prevTxLateCollision: 0 prevTxTotalCollision: 0 prevTxPauseHonored: 0 prevTxDrop: 0 prevTxJabber: 0 prevTxFCFSError: 0 prevTxControl: 0 prevTxFragment: 0 last_seen: 2023-01-04 04:30:07 present: 1 2 rows in set (0.000 sec)

coder-binary1 commented 1 year ago

and Here is the log output on web-UI

image image

coder-binary1 commented 1 year ago

@TheWitness I reported this issue, so you can't close it without discussing it with me.

skywalker-znz commented 1 year ago

@TheWitness can we please continue on the forum, still cannot get mikrotik poller work. Thank you.