Page 1 of 3

configurations could not be verified

Posted: Thu Feb 28, 2019 12:32 pm
by lukedevon
Hi

I have two nodes NLS cluster. when I'm trying to apply a filter, it always fails and saying that "configurations could not be verified". Can you help me to fix it?

Regards
Luke

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 12:35 pm
by scottwilkerson
Can you share what you are adding in the new filter?

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 12:53 pm
by lukedevon
Hi

Its a very basic filter.


Input:

tcp {
type => 'syslog'
port => 5544
}

Test Filters:

if [type] == "syslog" {
dns {
reverse => [ "host" ]
action => "replace"
}
mutate {
add_tag => [ "syslog" ]
}
}

OR

dns {
reverse => ["host"]
action => ["append"]
add_tag => ["dns"]
}


Regards
Luke.

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 1:18 pm
by scottwilkerson
Van you click Verify Configuration and send the error?

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 1:37 pm
by lukedevon
offline.png
new error.png
hi

Once verified;

Configuration is OK!

However, I just restarted both nodes and now the error has been changed. Please see the attached screenshots.

Br
Luke.

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 1:46 pm
by scottwilkerson
Can you verify crond is running on the server that says it is offline

Code: Select all

service crond status
chage -l nagios

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 1:54 pm
by lukedevon
1.png
Hi


Please find I have attached the screenshots.

Br
Luke.

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 4:39 pm
by scottwilkerson
Can you go to Configure -> Per Instance (Advanced) -> select instance that is failing
Click View -> All Files Combined

And send the whole thing

Thanks

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 5:36 pm
by lukedevon
Hi ,

#
# Logstash Configuration File
# Dynamically created by Nagios Log Server
#
# DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN.
#
# Created Fri, 01 Mar 2019 06:42:12 +0800
#

#
# Global inputs
#

input {
tcp {
type => 'syslog'
port => 5544
}

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

#
# Local inputs
#



#
# Global filters
#

filter {
dns {
reverse => ["host"]
action => ["append"]
add_tag => ["dns"]
}
}

#
# Local filters
#



#
# Required output for Nagios Log Server
#

output {
elasticsearch {
hosts => ['localhost']
document_type => '%{type}'
workers => 4
}
}

#
# Global outputs
#

output {

}

#
# Local outputs
#


Thank you
Luke.

Re: configurations could not be verified

Posted: Thu Feb 28, 2019 5:45 pm
by scottwilkerson
That is strange, this does not contain the filter you said you were adding earlier.

Can you post the output of the following

Code: Select all

ls -al /usr/local/nagioslogserver/logstash/etc/conf.d/
cat /usr/local/nagioslogserver/logstash/etc/conf.d/*
/usr/local/nagioslogserver/logstash/bin/logstash -t /usr/local/nagioslogserver/logstash/etc/conf.d/*.conf