IIS Dashboard - need geoip help

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: IIS Dashboard - need geoip help

Post by SteveBeauchemin »

sorry for the serial posting, but as I dig in I like to keep track of what I have looked at.

I just tried to circumvent the if statement in the filter. Changed the filter to this

Code: Select all

if [tags] == 'IIS_requests' {
  grok {
    match => {"message" => "%{DATESTAMP:timestamp} %{IPORHOST:hostip} %{WORD:method} %{URIPATH:request} (?:%{NOTSPACE:param}|-) %{NUMBER:port} (?:%{USER:username}|-) %{IPORHOST:clientip} (?:%{NOTSPACE:agent}|-) - %{NUMBER:response} %{NUMBER:status} %{NUMBER:substatus} %{NUMBER:timetaken}"}
  }
  date {
    match => ["timestamp", "yyyy-MM-dd HH:mm:ss"]
  }
  geoip {
    database => "/usr/share/GeoIP/GeoLite2-City.mmdb"
    source => "clientip"
  }
}

geoip {
  database => "/usr/share/GeoIP/GeoLite2-City.mmdb"
  source => "c-ip"
}
And now I do have geoip data showing up. So something in that filter syntax "if' statement is not cutting it. Does it work for you?

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: IIS Dashboard - need geoip help

Post by scottwilkerson »

If I had to guess you are running this through another filter first that is splitting the message field into it's parts and that the remaining "message" no longer matches the grok filter.

If the grok doesn't match, then the clientip field would never be set.

I assume this because your screenshot earlier in this thread already has all the message broken up into separate fields
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: IIS Dashboard - need geoip help

Post by SteveBeauchemin »

This is my story... I seem to write these small books often...

This entire dashboard is based on the Nagios Exchange NLS/IIS Dashboard post from "Spenser" sp? .
The nxlog setup he provided does split the IIS log into the correct pieces. I am not sure why the if statement in the filter is even there. I don't see that it is required at all. The name:value pair of c-ip:[client IP address] is already created by nxlog.

I was just taking the easy way out and assumed too much. I simply imported and used what was provided. Now that I have had to dig in, I do note some minor inconsistencies (trivial) with the files provided. Not all Panels are defined as the same width. Some are 4 and some are 6. I have changed the order at the bottom to have Log Sources display above Events. For my personal preference it made more sense to put the raw data at the bottom. To me that looks better.

Other than that, my SharePoint Admin is thrilled with this.

To make the mapping work, I needed to add a new geoip data file to the OS.

The only real concern I have is the IIS Dashboard map. I need a 'bettermap' as the default map is not going to give the visibility we need. Almost all the data is in the US. I need to see Where in the US it is. So I am adding bettermap.

But, when adding bettermap, filling in the tooltip field, I noticed that there were no geoip 'city' items to choose from. This may become a nuisance later. I'll reserve judgement until I get the rest of my IP squared away.

My plan is to add my company buildings to the geoip data so we can see where the web communication is coming from. We are using private IP Address space, so the basic geoip database is not going to be good enough. I will have to add my internal IP to the database via some code. I plan to grab the Internal IP location data from the Active Directory - Sites and Services information.

Once I have the private IP spaces working on a map I'll be happy. For now, I'm okay.

Since I am getting the geo data now I think this can be closed.

Thanks

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: IIS Dashboard - need geoip help

Post by scottwilkerson »

Sounds good Steve!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked