ERROR: No syslog service found.

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
jabi27
Posts: 34
Joined: Thu Jan 19, 2017 4:30 pm

ERROR: No syslog service found.

Post by jabi27 »

Hi

Trying to load syslog from Ubuntu 20.04

sudo bash setup-linux.sh -s nagios-server -p 5544

The script i failing and removing set -e from the script, gives this:

Code: Select all

sudo bash setup-linux.sh -s nagios-server -p 5544
Detected rsyslog 
Detected rsyslog work directory /var/spool/rsyslog
ERROR: No syslog service found.
But syslog appears to run:

Code: Select all

systemctl status rsyslog
● rsyslog.service - System Logging Service
     Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2020-06-28 15:24:42 CEST; 2h 8min ago
TriggeredBy: ● syslog.socket
       Docs: man:rsyslogd(8)
             https://www.rsyslog.com/doc/
   Main PID: 7963 (rsyslogd)
      Tasks: 4 (limit: 18985)
     Memory: 1.0M
     CGroup: /system.slice/rsyslog.service
             └─7963 /usr/sbin/rsyslogd -n -iNONE
Any idea ?

Best

/Jan
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: ERROR: No syslog service found.

Post by cdienger »

The script runs this command:

Code: Select all

rsyslogd -v
and then checks the output to make sure it returns a string that matches this regex:

Code: Select all

rsyslogd ([0-9]+\.[0-9]+\.[0-9]+)
If it doesn't find this string then it will fail with the message you are seeing.

What is the output of this command when you run it on the Ubuntu machine:

Code: Select all

rsyslogd -v
?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jabi27
Posts: 34
Joined: Thu Jan 19, 2017 4:30 pm

Re: ERROR: No syslog service found.

Post by jabi27 »

Code: Select all

root@barbar:~# rsyslogd -v
rsyslogd  8.2001.0 (aka 2020.01) compiled with:
	PLATFORM:				x86_64-pc-linux-gnu
	PLATFORM (lsb_release -d):		
	FEATURE_REGEXP:				Yes
	GSSAPI Kerberos 5 support:		Yes
	FEATURE_DEBUG (debug build, slow code):	No
	32bit Atomic operations supported:	Yes
	64bit Atomic operations supported:	Yes
	memory allocator:			system default
	Runtime Instrumentation (slow code):	No
	uuid support:				Yes
	systemd support:			Yes
	Config file:				/etc/rsyslog.conf
	PID file:				/run/rsyslogd.pid
	Number of Bits in RainerScript integers: 64

See https://www.rsyslog.com for more information.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: ERROR: No syslog service found.

Post by cdienger »

The regex doesn't match because it is only looking for a single space between the "rsyslogd' and version number string. I'll file a bug to update the script to take into account instances like yours were the line contains two spaces between the "rsyslogd" and version strings.

In the meantime you should be able to correct it by editing line 127 of setup-linux.sh and changing it from:

Code: Select all

regex='rsyslogd ([0-9]+\.[0-9]+\.[0-9]+)'
to:

Code: Select all

regex='rsyslogd\s+([0-9]+\.[0-9]+\.[0-9]+)'
You can find the script on the NLS machine at /var/www/html/nagioslogserver/www/scripts/setup-linux.sh.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jabi27
Posts: 34
Joined: Thu Jan 19, 2017 4:30 pm

Re: ERROR: No syslog service found.

Post by jabi27 »

Thanks

The script now executes to the end.

Code: Select all

 sudo bash setup-linux.sh -s nagios-logserver -p 5544
Detected rsyslog 8.2001.0
Detected rsyslog work directory /var/spool/rsyslog
Destination Log Server: nagios-logserver2.stil.dk:5544
Creating /etc/rsyslog.d/99-nagioslogserver.conf...
getenforce command not found, assuming SELinux is disabled.
rsyslog configuration check passed.
Restarting rsyslog service with 'service'...
Okay.
rsyslog is running with the new configuration.
Visit your Nagios Log Server dashboard to verify that logs are being received.
/Jan
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ERROR: No syslog service found.

Post by scottwilkerson »

jabi27 wrote:Thanks

The script now executes to the end.

Code: Select all

 sudo bash setup-linux.sh -s nagios-logserver -p 5544
Detected rsyslog 8.2001.0
Detected rsyslog work directory /var/spool/rsyslog
Destination Log Server: nagios-logserver2.stil.dk:5544
Creating /etc/rsyslog.d/99-nagioslogserver.conf...
getenforce command not found, assuming SELinux is disabled.
rsyslog configuration check passed.
Restarting rsyslog service with 'service'...
Okay.
rsyslog is running with the new configuration.
Visit your Nagios Log Server dashboard to verify that logs are being received.
/Jan
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked