This support forum board is for support questions relating to
Nagios Log Server , our solution for managing and monitoring critical log data.
benhank
Posts: 1264 Joined: Tue Apr 12, 2011 12:29 pm
Post
by benhank » Thu Jan 20, 2022 2:31 pm
Hello I am trying to follow these instructions:
Code: Select all
https://assets.nagios.com/downloads/nagios-log-server/docs/Sending-Nagios-Core-Logs-To-Nagios-Log-Server.pdf
and when I put in my servers ipaddy and run these commands:
Code: Select all
curl -s -O http://xxx.xxx.xxx.xxx/nagioslogserver/scripts/setup-linux.sh
sudo bash setup-linux.sh -s xxx.xxx.xxx.xxx -p 5544 -f "/usr/local/nagios/var/nagios.log" -t nagios_core
I get this error on three separate nagios core servers:
Code: Select all
setup-linux.sh: line 1: syntax error near unexpected token `newline'
setup-linux.sh: line 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
I am running Nagios Log Server 2.1.10
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
pbroste
Posts: 1288 Joined: Tue Jun 01, 2021 1:27 pm
Post
by pbroste » Fri Jan 21, 2022 11:00 am
Hello
@benhank
Thanks for reaching out, want to verify the user account that you are logged is as and if there is security application blocking things.
Verify that you are root:
Selinux is disabled:
Re-run to verify with
-x switch: (the 'curl -sS -0 HTTP://..... command downloads the script so it is already in the directory)
Code: Select all
sudo bash -x setup-linux.sh -s xxx.xxx.xxx.xxx -p 5544 -f "/usr/local/nagios/var/nagios.log" -t nagios_core
Please let us know how that looks,
Perry
benhank
Posts: 1264 Joined: Tue Apr 12, 2011 12:29 pm
Post
by benhank » Fri Jan 21, 2022 11:21 am
Same error after running the modified command running as root and selinux is disabled
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
pbroste
Posts: 1288 Joined: Tue Jun 01, 2021 1:27 pm
Post
by pbroste » Fri Jan 21, 2022 3:56 pm
Hello
@benhank
What does the output on this look like?
Verifying set -e
Code: Select all
sudo bash -x setup-linux.sh -s xxx.xxx.xxx.xxx -p 5544 -f "/usr/local/nagios/var/nagios.log" -t nagios_core
Thanks,
Perry
benhank
Posts: 1264 Joined: Tue Apr 12, 2011 12:29 pm
Post
by benhank » Mon Jan 24, 2022 9:43 am
hi perry its fixed
I opened the
file.
Here are the contents:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://myhost.domain.com/nagioslogserver/scripts/setup-linux.sh">here</a>.</p>
</body></html>
So I opened the link, downloaded the file. replaced the
, with the one in the redirect link.
I then ran the command you gave me and its working now
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
pbroste
Posts: 1288 Joined: Tue Jun 01, 2021 1:27 pm
Post
by pbroste » Mon Jan 24, 2022 10:34 am
Excellent, thanks for updating the post with the details on how you resolved the issue.
I will go ahead and lock this,
Perry