Page 1 of 2

Panel type MAP is not working

Posted: Tue Jun 26, 2018 3:15 pm
by ssoliveira
Hello,

The MAP component is not working correctly.

BETTERMAP is Ok, but MAP is displaying javascript errors.

I replicated the production environment in the laboratory, and the same problem occurs. Version "Nagios Log Server 2.0.4"

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 3:17 pm
by ssoliveira
attachments 1, 2, 3

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 3:19 pm
by ssoliveira
attachments 4, 5 , 6

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 3:20 pm
by ssoliveira
attachment 7

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 3:40 pm
by scottwilkerson
I have it working with the field set to

Code: Select all

geoip.region_name

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 5:18 pm
by ssoliveira
Hi,

We noticed that the problem started after the update

Nagios Log Server 2.0.2 (is working)
Nagios Log Server 2.0.4 (is not working)

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 5:24 pm
by ssoliveira
We also realized that many ip can not solve the geoip. Apparently the database is old. Is there a procedure for updating the database?

/usr/local/nagioslogserver/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-2.0.7/vendor
[root@clone vendor]# ls -la
total 21408
drwxr-xr-x 2 nagios nagios 71 Jun 26 15:10 .
drwxr-xr-x 4 nagios nagios 4096 Jun 26 15:10 ..
-rw-r--r-- 1 nagios nagios 3545918 Jun 26 15:10 GeoIPASNum-2014-02-12.dat
-rw-r--r-- 1 nagios nagios 18370259 Jun 26 15:10 GeoLiteCity-2013-01-18.dat

Re: Panel type MAP is not working

Posted: Tue Jun 26, 2018 5:52 pm
by scottwilkerson
Here's a method shared by another user to use GeoIP packages instead of what is pre-packaged

https://support.nagios.com/forum/viewto ... 37&t=39117

Re: Panel type MAP is not working

Posted: Wed Jun 27, 2018 9:25 am
by ssoliveira
Hi good morning.

The documentation of "maxmind" informs that the database will no longer be available, starting next year.

I opened the plugin file, it is very simple to update.
Remove the previous file, and put the new one in the folder, because the plugin looks for a file with the name "GeoLiteCity * .dat"

It would be interesting if the next version in NLS came with this file; updated.

https://dev.maxmind.com/geoip/legacy/geolite/

"Updated versions of the GeoLite Legacy databases are now available only to redistribution license customers, although anyone can continue to download the March 2018 GeoLite Legacy builds, starting January 2, 2019, the last build will be removed from our website. will need to switch to the GeoLite2 or commercial GeoIP databases and update their integrations by January 2, 2019. "


vim /usr/local/nagioslogserver/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-2.0.7/lib/logstash/filters/geoip.rb

Code: Select all

    if @ database.nil?
      @database = :: Dir.glob (:: File.join (:: File.expand_path ("../../../ vendor /", :: File.dirname (__ FILE __)), "GeoLiteCity * .dat "). first
      if! File.exists? (@ database)
        raise "You must specify 'database => ...' in your geoip filter (I looked for '# {@ database}'"
      end
    end
/usr/local/nagioslogserver/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-2.0.7/vendor

About the problem I'm having with version 2.0.4, have you ever replicated the problem? I downloaded the nls again, and installed on a new machine, and the problem occurs. In the previous versions it is ok, maybe it is some problem that occurred when protecting the files (at the moment of packing the nls).

Re: Panel type MAP is not working

Posted: Wed Jun 27, 2018 9:31 am
by ssoliveira
GeoLiteCity is not available in CentOS 7 (epel, etc). CentOS 6 only

Code: Select all

[root@clone GeoIP]# yum search geoip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.xpg.com.br
 * epel: mirror.globo.com
 * extras: centos.xpg.com.br
 * updates: centos.xpg.com.br
==================================== N/S matched: geoip ====================================
GeoIP-data.noarch : Static snapshot of GeoIP databases
GeoIP-devel.i686 : Development headers and libraries for GeoIP
GeoIP-devel.x86_64 : Development headers and libraries for GeoIP
lighttpd-mod_geoip.x86_64 : GeoIP module for lighttpd to use for location lookups
mod_geoip.x86_64 : GeoIP module for the Apache HTTP Server
nginx-mod-http-geoip.x86_64 : Nginx HTTP geoip module
opensips-mmgeoip.x86_64 : Wrapper for the MaxMind GeoIP API
pdns-backend-geoip.x86_64 : GeoIP backend for pdns
python-GeoIP.x86_64 : Python bindings for the GeoIP geographical lookup libraries
python-pygeoip.noarch : Pure Python GeoIP API
syslog-ng-geoip.x86_64 : geoip support for syslog-ng
uwsgi-plugin-geoip.x86_64 : uWSGI - Plugin for GeoIP support
GeoIP.i686 : Library for country/city/organization to IP address or hostname mapping
GeoIP.x86_64 : Library for country/city/organization to IP address or hostname mapping
GeoIP-update.noarch : Crontab entry to facilitate automatic updates of databases
perl-Geo-IP.x86_64 : Efficient Perl bindings for the GeoIP location database
php-pecl-geoip.x86_64 : Extension to map IP addresses to geographic places

  Name and summary matches only, use "search all" for everything.