Showing list of host names that have been added

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Showing list of host names that have been added

Post by eloyd »

stecino wrote:Yes, I tried to add US map, as our data centers in US. What would be the field name in logstash that defines a data center? I guess how can add all these hosts (IPs) that translates to a single state code.
You may need to define a global filter that takes the input and extracts the IP of the location of the equipment and assigns it to the geoip source. Something like this:

Code: Select all

if [program] == 'syslog' {
    geoip {
        source => 'host'
    }
}
This takes all incoming logs from the syslog source and populates the geoip information with the host IP of the generating machine. Your mileage may vary on this, but that's the basic idea.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Showing list of host names that have been added

Post by lmiltchev »

Thanks, eloyd!
Be sure to check out our Knowledgebase for helpful articles and solutions!
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: Showing list of host names that have been added

Post by stecino »

eloyd wrote:
stecino wrote:Yes, I tried to add US map, as our data centers in US. What would be the field name in logstash that defines a data center? I guess how can add all these hosts (IPs) that translates to a single state code.
You may need to define a global filter that takes the input and extracts the IP of the location of the equipment and assigns it to the geoip source. Something like this:

Code: Select all

if [program] == 'syslog' {
    geoip {
        source => 'host'
    }
}
This takes all incoming logs from the syslog source and populates the geoip information with the host IP of the generating machine. Your mileage may vary on this, but that's the basic idea.
Thanks for the info. So I created a global filter, and applied global config changes to the cluster. So in the all events panel, when selecting geoip or geoip.lcoation fields I am still not seeing anything. Do I need to do anything else?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Showing list of host names that have been added

Post by eloyd »

If you start with the "Nagios Log Server Search" dashbaord, and select a record from the text at the bottom (single click the "message" line, for instance, what shows up in the "host" line?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Showing list of host names that have been added

Post by sreinhardt »

I'm just going to emulate lmiltchev, "Thanks eloyd!" Good work!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: Showing list of host names that have been added

Post by stecino »

eloyd wrote:If you start with the "Nagios Log Server Search" dashbaord, and select a record from the text at the bottom (single click the "message" line, for instance, what shows up in the "host" line?
Host has the value of the IP of the host that message record belong to, but it doesn't have any geoIP. It only shows info based on my mappings. So for geoIP to be populated, do I need to update my mappings?
I can make it show geoIP column if I select all, but then it still not showing the geoip after I activated the global filter
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Showing list of host names that have been added

Post by eloyd »

Let me get back to you on this. I'll need to examine what we did on our server. I may have missed something.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: Showing list of host names that have been added

Post by stecino »

eloyd wrote:Let me get back to you on this. I'll need to examine what we did on our server. I may have missed something.
Thanks greatly appreciate it
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Showing list of host names that have been added

Post by scottwilkerson »

To be clear, are your "host" IP addresses "real" IP's or private IP's?

The geoip filter will only work with non-private IP's.

If they are real IP's, do you see the geoip fields in the table view of the events? If so, on the Bettermap settings, set the "Coordinate Field" to geoip.location and Tooltip Field to geoip.city_name
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: Showing list of host names that have been added

Post by stecino »

scottwilkerson wrote:To be clear, are your "host" IP addresses "real" IP's or private IP's?

The geoip filter will only work with non-private IP's.

If they are real IP's, do you see the geoip fields in the table view of the events? If so, on the Bettermap settings, set the "Coordinate Field" to geoip.location and Tooltip Field to geoip.city_name
My IPs are private IPs. So I guess that answers the question. Is there a way for me to add NATed IPs that are public facing to this?
Locked