Hi,
I installed Nagios XI 5.4.11 offline distribution on CentOS 7.4. I tried to use the component "SNMP Trap Sender" but its installation script install.sh is empty (size zero). Where can I find the right install.sh script?
Thank you,
Enrico
SNMP Trap Sender component with empty install.sh script
-
kyang
Re: SNMP Trap Sender component with empty install.sh script
There's a script, but it's empty? correct? Anything else empty?
That's the code I have in my script for a 5.4.11 ova install, try that out.
Code: Select all
ls -la /usr/local/nagiosxi/html/includes/components/snmptrapsender
Code: Select all
#!/bin/bash
. /usr/local/nagiosxi/var/xi-sys.cfg
componentdir=/usr/local/nagiosxi/html/includes/components/snmptrapsender
# Install required rpms
echo "Installing required components..."
if [ "$distro" != "Ubuntu" ] && [ "$distro" != "Debian" ]; then
yum install net-snmp net-snmp-utils net-snmp-devel -y
fi
pushd $componentdir
# Install MIBS
echo "Installing MIBs..."
cp mibs/*.txt /usr/share/snmp/mibs/
# Write installed file/flat
touch installed
chown nagios:nagios installed
# Set permissions on net-snmp
if [ -d "/var/lib/net-snmp" ]; then
chown nagios:nagios /var/lib/net-snmp
fi
popd
echo "==============="
echo "SETUP COMPLETED"
echo "==============="
Re: SNMP Trap Sender component with empty install.sh script
Hi Kiang, it follows my checks results:
# ls -la /usr/local/nagiosxi/html/includes/components/snmptrapsender
total 36
drwxr-xr-x 3 nagios nagios 102 Dec 12 11:31 .
drwxr-xr-x 59 nagios nagios 4096 Dec 12 11:31 ..
-rwxr-xr-x 1 nagios nagios 1174 Dec 12 11:31 CHANGES.TXT
-rwxr-xr-x 1 nagios nagios 0 Dec 12 11:31 install.sh
drwxr-xr-x 2 nagios nagios 62 Dec 12 11:31 mibs
-rwxr-xr-x 1 nagios nagios 889 Dec 12 11:31 sanity.sh
-rwxr-xr-x 1 nagios nagios 20799 Dec 12 11:31 snmptrapsender.inc.php
I found also these installers:
# find / -name "*snmptrapsender*.zip" | xargs ls -la
-rwxr--r-x 1 root root 11315 Nov 1 22:45 /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
-rwxr--r-x 1 root root 11315 Nov 1 22:45 /application/tmp/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
-rw-r--r-- 1 nagios nagios 11210 Dec 21 16:48 /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
# unzip -l /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
Archive: /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
6eb4778bd9eb0d2920d4c9c149a2052ad33f1ea5
Length Date Time Name
--------- ---------- ----- ----
0 06-03-2016 18:54 snmptrapsender/
1174 06-03-2016 18:54 snmptrapsender/CHANGES.TXT
672 06-03-2016 18:54 snmptrapsender/install.sh
0 06-03-2016 18:54 snmptrapsender/mibs/
19760 06-03-2016 18:54 snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt
2093 06-03-2016 18:54 snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt
889 06-03-2016 18:54 snmptrapsender/sanity.sh
20799 06-03-2016 18:54 snmptrapsender/snmptrapsender.inc.php
--------- -------
45387 8 files
# unzip -l /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
Archive: /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
Length Date Time Name
--------- ---------- ----- ----
0 12-12-2017 11:31 snmptrapsender/
0 12-12-2017 11:31 snmptrapsender/install.sh
1174 12-12-2017 11:31 snmptrapsender/CHANGES.TXT
0 12-12-2017 11:31 snmptrapsender/mibs/
19760 12-12-2017 11:31 snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt
2093 12-12-2017 11:31 snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt
889 12-12-2017 11:31 snmptrapsender/sanity.sh
20799 12-12-2017 11:31 snmptrapsender/snmptrapsender.inc.php
--------- -------
44715 8 files
The only difference in these zip installers is in fact in the install.sh script.
The not empty install.sh script has the same content that you pasted in your answer, I copied it under /usr/local/nagiosxi/html/includes/components/snmptrapsender and I executed it successfully.
Thank you,
Enrico
# ls -la /usr/local/nagiosxi/html/includes/components/snmptrapsender
total 36
drwxr-xr-x 3 nagios nagios 102 Dec 12 11:31 .
drwxr-xr-x 59 nagios nagios 4096 Dec 12 11:31 ..
-rwxr-xr-x 1 nagios nagios 1174 Dec 12 11:31 CHANGES.TXT
-rwxr-xr-x 1 nagios nagios 0 Dec 12 11:31 install.sh
drwxr-xr-x 2 nagios nagios 62 Dec 12 11:31 mibs
-rwxr-xr-x 1 nagios nagios 889 Dec 12 11:31 sanity.sh
-rwxr-xr-x 1 nagios nagios 20799 Dec 12 11:31 snmptrapsender.inc.php
I found also these installers:
# find / -name "*snmptrapsender*.zip" | xargs ls -la
-rwxr--r-x 1 root root 11315 Nov 1 22:45 /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
-rwxr--r-x 1 root root 11315 Nov 1 22:45 /application/tmp/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
-rw-r--r-- 1 nagios nagios 11210 Dec 21 16:48 /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
# unzip -l /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
Archive: /application/nagiosxi/subcomponents/xicomponents/components/snmptrapsender.zip
6eb4778bd9eb0d2920d4c9c149a2052ad33f1ea5
Length Date Time Name
--------- ---------- ----- ----
0 06-03-2016 18:54 snmptrapsender/
1174 06-03-2016 18:54 snmptrapsender/CHANGES.TXT
672 06-03-2016 18:54 snmptrapsender/install.sh
0 06-03-2016 18:54 snmptrapsender/mibs/
19760 06-03-2016 18:54 snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt
2093 06-03-2016 18:54 snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt
889 06-03-2016 18:54 snmptrapsender/sanity.sh
20799 06-03-2016 18:54 snmptrapsender/snmptrapsender.inc.php
--------- -------
45387 8 files
# unzip -l /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
Archive: /usr/local/nagiosxi/tmp/component-snmptrapsender.zip
Length Date Time Name
--------- ---------- ----- ----
0 12-12-2017 11:31 snmptrapsender/
0 12-12-2017 11:31 snmptrapsender/install.sh
1174 12-12-2017 11:31 snmptrapsender/CHANGES.TXT
0 12-12-2017 11:31 snmptrapsender/mibs/
19760 12-12-2017 11:31 snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt
2093 12-12-2017 11:31 snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt
889 12-12-2017 11:31 snmptrapsender/sanity.sh
20799 12-12-2017 11:31 snmptrapsender/snmptrapsender.inc.php
--------- -------
44715 8 files
The only difference in these zip installers is in fact in the install.sh script.
The not empty install.sh script has the same content that you pasted in your answer, I copied it under /usr/local/nagiosxi/html/includes/components/snmptrapsender and I executed it successfully.
Thank you,
Enrico
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SNMP Trap Sender component with empty install.sh script
Hello, @enricoitl. Was your problem resolved? May I lock this thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SNMP Trap Sender component with empty install.sh script
Hi,
yes you can close this request.
Thank you,
Enrico
yes you can close this request.
Thank you,
Enrico