Cacti / plugin_mikrotik

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

Ability to use Host Names on graphs #42

Closed flewid closed 2 years ago

flewid commented 4 years ago

I'm generating a bunch of graphs on 1.3.0 dev version of cacti for my MikroTik hAP2

I'm interested in monitoring the bandwidth of certain clients on the local network.

Currently the graphs are titled with the following;

|host_description| - Wireless Packets for |query_macAddress| |query_hostname| |query_ip|

which results in

MikroTik - Wireless Traffic for 00:00:00:00:00:00

I want something like

MikroTik - Wireless Traffic for [MAC ADDRESS] MikroTik - Wireless Traffic for SomeHost.com [00:00:00:00:00:00]

I tried editing the graph templates to this, but no joy

|host_description| - Wireless Packets for |query_macAddress| |query_hostname| |query_ip|

is there a way of getting this? even if it's manual or something?

TheWitness commented 2 years ago

So, this is key in the Data Query. What Data Query is this for?

TheWitness commented 2 years ago

To make this work, you need to update the XML file in the resources directory and then of course, update your templates. After that, reindex and Re-apply suggested names if there is more than one. If we are gathering the information and storing in a table, then we would have to add a gethostbyaddress() call to the poller. Since I'm not using this feature on my Tiks, it'll have to be contributed by someone.

flewid commented 2 years ago

Sorry I forgot to reply previously - I actually no longer have a MikroTik device so I can't test this now :(

TheWitness commented 2 years ago

No problem. Nice idea though.