@mattmary opened this Issue on December 15th 2022 Contributor

One of our plugin users asked us if he could get a whois integration in Matomo


Otherwise, he has to copy and paste the IP in a term.
Maybe it could be a plugin which parse the generated content looking for IPs and add this feature?

Your Environment

  • Matomo Version: 4.13.0
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
@mmokrejs commented on December 16th 2022

Ideally a mouse hover() over the IP address shown in "Visitors" -> "Visits log" would show parsed WHOIS info for the network and also simple ip2hostname translation. Somes either of the two is too generic and useless.

You could even show both parsed text values underneath the IP address, that woud be even better as one can search for it using "Select a segment of visits:", would that support a REGEXP search or at least a substring search or .startswith() or .endswith() conditionals. Currently only mathematics operators are allowed ... for the Visitor IP cases I tried at least.

BTW, am on PHP 7.4.

@sgiehl commented on December 19th 2022 Member

This might be similar or even a duplicate of #3889.
Personally I think this might be a very rare use case, as the majority of Matomo users are using the IP Anonymization, which makes it impossible to fetch this data afterwards. It would though be needed to do that prior to anonymizing the IP, which would make the tracking requests slower, as it needs to send out whois requests before storing any data.
I don't think this is something that might come to core soon. Nevertheless it should be possible to develop a custom plugin for this.

@mmokrejs commented on December 22nd 2022

I do not know about your experience but I always inspected the Apache logs before Wordpress and similar tools arose. Definitely, it is disappointing one cannot do a simple filtering search using IP address ranges using a wildcard or even a substring search.

The hostname and whois queries could be done later by some batch "overnight" and then the IP address zapped. Why do you need to do all the queries before an entry is added to the logs? Isn't it in an editable database?

Seems like I should leave Matomo. I just inspect the Visits log and that's it. And these simple additions are simply missing.

@sgiehl commented on December 23rd 2022 Member

@mmokrejs That would need to be done upfront, as Matomo can be configured to anonymize IPs. If that is the case, the ip is stored anonymized in the database, which would make it impossible to work with the IP later.
It seem you don't use IP anonymization, in that case it would for sure also be possible to do that later.

@mmokrejs commented on December 23rd 2022

@sgiehl Yes, I do not use IP anonymization so it can be done in some batches or another thread. Still I think the anonymization could happen before the IP is shredded so the freature could be available even to users using IP anonymization.

Powered by GitHub Issue Mirror