Page 1 of 2
folder watch
Posted: Wed Sep 07, 2016 3:02 pm
by iroy
Thanks in advance for trying to help.
Using the configuration wizard, trying to setup "folder watch" where if a file is created in a folder then an email will get sent out.
In using the configuration wizard, i'm getting:
It looks like the install script has failed. You may need to run the script as root:
sh /usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh
In running install.sh, i'm getting:
root@node-0:/usr/local/nagiosxi/html/includes/configwizards/folder_watch# sh /usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh
/usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh: 2: /usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh: yum: not found
Seems install.sh installs perl and i checked to see if perl has been installed.
root@node-0:/usr/local/nagiosxi/html/includes/configwizards/folder_watch# perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
(with 44 registered patches, see perl -V for more detail)
Copyright 1987-2013, Larry Wall
Re: folder watch
Posted: Wed Sep 07, 2016 3:14 pm
by mcapra
What OS is this machine using? Can you share the output of:
Can you also share the output of:
Re: folder watch
Posted: Thu Sep 08, 2016 12:35 pm
by iroy
root@vps-cl0:/usr/local/nagiosxi/html# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="
http://www.ubuntu.com/"
SUPPORT_URL="
http://help.ubuntu.com/"
BUG_REPORT_URL="
http://bugs.launchpad.net/ubuntu/"
Re: folder watch
Posted: Thu Sep 08, 2016 12:46 pm
by mcapra
Nagios XI is not currently supported for Ubuntu based systems. We only currently support clean minimal CentOS and RHEL systems.
Having said that, you might try to modify the
/usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh file to use
apt-get instead of
yum. Not sure if the packages being installed for this wizard are in
apt though.
You could also install the module through cpan:
Re: folder watch
Posted: Thu Sep 08, 2016 1:57 pm
by iroy
thanks mcapra.
The specific install.sh is trying to install perl.
root@vps-cl0:/usr/local/nagiosxi/html# more /usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh
#!/bin/sh
yum install 'perl(Date::Parse)' -y
exit 0
However, perl is already on the server.
root@vps-cl0:/usr/local/nagiosxi/html# perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
(with 44 registered patches, see perl -V for more detail)
Copyright 1987-2013, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Do I still need to run install.sh replacing yum with apt-get
Re: folder watch
Posted: Thu Sep 08, 2016 2:06 pm
by mcapra
The script is actually trying to install the perl module Date::Parse which is required for the folder watch plugin.
It looks like the equivalent apt package is libdatetime-format-dateparse-perl if installing the module through cpan is not an option.
Re: folder watch
Posted: Thu Sep 08, 2016 2:39 pm
by iroy
thanks mcapra.
root@node-1:/usr/local/nagiosxi/html/includes/configwizards/folder_watch# more install.sh
#!/bin/sh
#yum install 'perl(Date::Parse)' -y
cpan -i Date::Parse
exit 0
And running install.sh, I got below.
Fetching with LWP:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Date::Parse is up to date (2.30).
However, still getting same error message from configuration wizard.
It looks like the install script has failed. You may need to run the script as root:
sh /usr/local/nagiosxi/html/includes/configwizards/folder_watch/install.sh
Re: folder watch
Posted: Thu Sep 08, 2016 3:24 pm
by mcapra
Again, this is likely the result of trying to use Nagios XI on an Ubuntu system; We currently only support and test against CentOS and RHEL.
Can you share the output of the following from the CLI:
Re: folder watch
Posted: Thu Sep 08, 2016 3:29 pm
by iroy
thanks mcapra again.
command seems to have executed ok.
root@node-1:/home/vps# perl -MDate::Parse -e ';'
root@node-1:/home/vps# echo $?
0
Re: folder watch
Posted: Thu Sep 08, 2016 3:35 pm
by mcapra
What version of Nagios XI are you using? Also what version of the Folder Watch wizard are you using?
You should be able to find the Folder Watch version under Admin->Manage Config Wizards.