Cisco Switch Logs

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cisco Switch Logs

Post by jolson »

Please verify that your permissions are correct:

Code: Select all

ls -l /usr/local/nagioslogserver/logstash/etc/conf.d/
Can you post your inputs that you defined globally? I would like to take a look at them.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ssavaso
Posts: 24
Joined: Mon Jan 05, 2015 5:50 pm

Re: Cisco Switch Logs

Post by ssavaso »

[root@localhost conf.d]# more 000_inputs.conf
#
# Logstash Configuration File
# Dynamically created by Nagios Log Server
#
# DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN.
#
# Created Tue, 31 Mar 2015 17:12:55 -0400
#

#
# Global inputs
#



#
# Local inputs
#

input {
syslog {
type => 'syslog'
port => 514
}
}
[root@localhost conf.d]# more 500_filters.conf
#
# Logstash Configuration File
# Dynamically created by Nagios Log Server
#
# DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN.
#
# Created Tue, 31 Mar 2015 17:12:55 -0400
#

#
# Global filters
#

filter {
if [program] == 'apache_access' {
grok {
match => [ 'message', '%{COMBINEDAPACHELOG}']
}
date {
match => [ 'timestamp', 'dd/MMM/yyyy:HH:mm:ss Z' ]
}
mutate {
replace => [ 'type', 'apache_access' ]
convert => [ 'bytes', 'integer' ]
convert => [ 'response', 'integer' ]
}
}

if [program] == 'apache_error' {
grok {
match => [ 'message', '\[(?<timestamp>%{DAY:day} %{MONTH:month} %{MONTHDAY} %{TIME} %{YEAR})\] \[%{WORD:clas
s}\] \[%{WORD:originator} %{IP:clientip}\] %{GREEDYDATA:errmsg}']
}
mutate {
replace => [ 'type', 'apache_error' ]
}
}
}

#
# Local filters
#


[root@localhost conf.d]# more 999_outputs.conf
#
# Logstash Configuration File
# Dynamically created by Nagios Log Server
#
# DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN.
#
# Created Tue, 31 Mar 2015 17:12:55 -0400
#

#
# Required output for Nagios Log Server
#

output {
elasticsearch {
cluster => '81d8dd31-4078-4c51-a8d3-9d102bb9cd6c'
host => 'localhost'
index_type => '%{type}'
node_name => '474fc199-f9b8-4f20-ad18-e65d39bb7345'
protocol => 'transport'
workers => 4
}
}

#
# Global outputs
#



#
# Local outputs
#


[root@localhost conf.d]#
ssavaso
Posts: 24
Joined: Mon Jan 05, 2015 5:50 pm

Re: Cisco Switch Logs

Post by ssavaso »

This is from the web interface.

tcp {
type => 'import_json'
tags => 'import_json'
port => 2057
codec => json
}

tcp {
type => 'import_raw'
tags => 'import_raw'
port => 2056
}

tcp {
type => 'eventlog'
port => 3515
codec => json {
charset => 'CP1252'
}
}

syslog {
type => 'syslog'
port => 514
}

syslog {
type => 'syslog'
port => 514
}
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cisco Switch Logs

Post by jolson »

Please remove one of your syslog entries - you cannot have multiple inputs on the same port (unless they are using different protocols). After that, Apply Configuration and let us know if that works. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ssavaso
Posts: 24
Joined: Mon Jan 05, 2015 5:50 pm

Re: Cisco Switch Logs

Post by ssavaso »

I deleted the last entry and every time I do that it returns.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cisco Switch Logs

Post by jolson »

Did you define any local inputs or filters as shown in my screenshot? If so, I recommend deleting them and using Global Configuration exclusively.
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ssavaso
Posts: 24
Joined: Mon Jan 05, 2015 5:50 pm

Re: Cisco Switch Logs

Post by ssavaso »

I did and that is when everything started working.

The red circle keeps coming back no mater how many times I delete it.
You do not have the required permissions to view the files attached to this post.
Last edited by ssavaso on Wed Apr 01, 2015 5:14 pm, edited 3 times in total.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cisco Switch Logs

Post by jolson »

Great - so is everything working well? Do you have any questions?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ssavaso
Posts: 24
Joined: Mon Jan 05, 2015 5:50 pm

Re: Cisco Switch Logs

Post by ssavaso »

What I mean is when I defined the local port to the local instance that is when everything started working.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cisco Switch Logs

Post by jolson »

Can you please show me your logstash configuration file?

Code: Select all

cat /etc/sysconfig/logstash
Also, from the Web GUI please remove the local input. We will stick with a Global input for now.

I would also like you to verify permissions:

Code: Select all

ls -l /usr/local/nagioslogserver/logstash/etc/conf.d/
Best,

Jesse
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked