Bug#299613: [Pkg-nagios-devel] Bug#299613: nagios-mysql: Confusing installation documentation
sean finney
sean finney <seanius@debian.org>, 299613@bugs.debian.org
Tue, 15 Mar 2005 12:29:44 -0500
--xgyAXRrhYN0wYx8y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
hi david,
looking a little more closely at the patch:
On Tue, Mar 15, 2005 at 12:04:09PM +0000, David Greaves wrote:
> ! $ zcat /usr/share/doc/nagios-mysql/create_mysql.sql.gz | mysql -u root =
-p nagios
> ! $ zcat /usr/share/doc/nagios-mysql/create_mysql.gz | mysql -u root -p n=
agios
whoops, fixed. thanks.
> + First, how to do it by hand, then there's a sed script that may help:
> +=20
> =20
> + This sed script assumes you have a local database on a standard port
> + with a database/user/password of nagios/nagios/password
> +=20
> + sed -i.orig '
> + s/#x\(.\)ddb_database=3Dsomedatabase/x\1ddb_database=3Dnagios/;
> + s/#x\(.\)ddb_username=3Dsomeuser/x\1ddb_username=3Dnagios/;
> + s/#x\(.\)ddb_password=3Dsomepassword/x\1ddb_password=3Dpassword/;
> + ' /etc/nagios/cgi.cfg /etc/nagios/nagios.cfg
unfortunately, this involves passing credentials on the cmdline which
can be read by anyone, so i would not include such a recommendation.
> + Then you want the cgi-script and the init.d script to correctly know the
> + status of nagios. You need the check_nagios_db file from
> + /usr/doc/nagios-common/, put it where you like but adjust the pathes in
> + the following examples. I REALLY suggest /etc/nagios/check_nagios_db as
> + the init-script now already looks if it is there and will use it
> + automagically.
included, thanks. =20
> + If you use PostgreSQL you need to change the line
> + my $driver =3D "mysql"; in the script to
> + my $driver =3D "Pg";
kind of moot, since there's already a README.pgsql in nagios-pgsql :)
> + Make it executable:
> + sudo chmod +x /etc/nagios/check_nagios_db
> +=20
> + Now edit the /etc/nagios/cgi.cfg and put a # in front of the line
> + nagios_check_command=3D/usr/lib/nagios/plugins/check_nagios /var/log/na=
gios/status.log 5 'nagios'
> +=20
> + and remove the # in front of the line
> + nagios_check_command=3D/etc/nagios/check_nagios_db
> +=20
> + now start nagios
> +=20
included, thanks.
sean
--=20
--xgyAXRrhYN0wYx8y
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFCNxuIynjLPm522B0RAje+AJ4n3WpE1w0kJQx6mtq0Pf478IQTiwCeMqdi
ZWs+2SHswVZeJZtNF9nDJWA=
=HrHs
-----END PGP SIGNATURE-----
--xgyAXRrhYN0wYx8y--