Page 1 of 1

Error " Error: No config files found: /usr/local/nagioslogse

Posted: Tue Apr 18, 2017 6:49 am
by anish
Receiving an error while verifying the Configuration in Nagios Log server.

Error " Error: No config files found: /usr/local/nagioslogserver/tmp58f5fc67c300a
Can you make sure this path is a logstash config file?"

When checked there is no such file "tmp58f5fc67c300a " found .

Please find the out put file configuration .

Code: Select all

# 
# Logstash Configuration File
# Dynamically created by Nagios Log Server
#
# DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN.
#
# Created Tue, 18 Apr 2017 07:48:08 -0400
#

#
# Global inputs
#

input {
    syslog {
        type => 'syslog'
        port => 5544
    }
    tcp {
        type => 'eventlog'
        port => 3515
        codec => json {
            charset => 'CP1252'
        }
    }
    tcp {
        type => 'import_raw'
        tags => 'import_raw'
        port => 2056
    }
    tcp {
        type => 'import_json'
        tags => 'import_json'
        port => 2057
        codec => json
    }
    syslog {
        type => 'esxi'
        port => 1514
    }
}

#
# Local inputs
#



#
# Global filters
#

filter {
    if [program] == 'apache_access' {
        grok {
            match => [ 'message', '%{COMBINEDAPACHELOG}']
        }
        date {
            match => [ 'timestamp', 'dd/MMM/yyyy:HH:mm:ss Z', 'MMM dd HH:mm:ss', 'ISO8601' ]
        }
        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:class}\] \[%{WORD:originator} %{IP:clientip}\] %{GREEDYDATA:errmsg}']
        }
        mutate {
            replace => [ 'type', 'apache_error' ]
        }
    }
}

#
# Local filters
#



#
# Global outputs
#



#
# Local outputs
#

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Tue Apr 18, 2017 11:13 am
by mcapra
Can you share the output of these commands:

Code: Select all

getenforce
ls -al /usr/local/nagioslogserver/
df -h
cat /etc/passwd | grep apache
cat /etc/passwd | grep nagios
groups nagios
groups apache

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Tue Apr 18, 2017 12:12 pm
by anish
Hi Please find the out put of the commands

Code: Select all

[root@SGKCLNGLSIPD01 ~]# ls -al /usr/local/nagioslogserver/
total 56
drwxr-xr-x  11 nagios nagios  4096 Apr 18 07:41 .
drwxr-xr-x. 14 root   root    4096 Mar 21 09:51 ..
drwxr-xr-x.  7 nagios nagios  4096 Jul 22  2016 elasticsearch
drwxrwxr-x.  2 nagios nagios  4096 Jul 22  2016 etc
drwxrwxrwx.  6 nagios nagios  4096 Jul 22  2016 logstash
drwx------   2 root   root   16384 Mar  1 00:00 lost+found
drwxrwxr-x.  2 nagios nagios  4096 Jul 22  2016 mibs
drwxrwxr-x.  2 nagios nagios  4096 Jul 22  2016 scripts
drwxrwxr-x.  2 nagios nagios  4096 Apr 18 07:41 snapshots
drwxrwxr-x.  3 nagios nagios  4096 Apr 18 07:41 tmp
drwxrwxr-x.  2 nagios nagios  4096 Oct 17  2016 var

[root@SGKCLNGLSIPD01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 99G   24G   74G  25% /
devtmpfs              3.9G  160K  3.9G   1% /dev
tmpfs                 4.0G     0  4.0G   0% /dev/shm
/dev/sda1              99G   24G   74G  25% /
/dev/mapper/vg_app-lv_app
                      394G   49G  325G  14% /usr/local/nagioslogserver
//10.52.126.101/nagios_repository$
                      4.0T   82G  4.0T   2% /repository

[root@SGKCLNGLSIPD01 ~]# cat /etc/passwd | grep apache
apache:x:48:48:Apache:/var/www:/sbin/nologin

[root@SGKCLNGLSIPD01 ~]# cat /etc/passwd | grep nagios
nagios:x:500:100::/home/nagios:/bin/bash

[root@SGKCLNGLSIPD01 ~]# groups nagios
nagios : users apache nagios

[root@SGKCLNGLSIPD01 ~]# groups apache
apache : apache nagios

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Tue Apr 18, 2017 12:30 pm
by mcapra
The nagios group does not have write permissions on /usr/local/nagioslogserver/. Can you run this command and see if that fixes the issue:

Code: Select all

chmod 775 /usr/local/nagioslogserver/
I also need to see this output still:

Code: Select all

getenforce

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Wed Apr 19, 2017 4:11 am
by anish
After providing the write permissions on /usr/local/nagioslogserver/ group the issue fixed . Thanks for your help .

The out put for the command "getenforce"

[root@SGKCLNGLSIPD01 local]# getenforce
Disabled

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Wed Apr 19, 2017 9:09 am
by cdienger
Hi anish,

Did you have any additional questions?

Re: Error " Error: No config files found: /usr/local/nagiosl

Posted: Wed Apr 19, 2017 9:37 am
by anish
No Thanks for your help . Please close the case