HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   Server Monitoring With munin And monit (

kdclaver 1st December 2006 17:16

Server Monitoring With munin And monit
Hello Falko,
I've seen your beautiful howto about the monitoring and decide to implement it on my server. However I'm face to an error when initiating a command to create the certificate of monit. Below you've the error message :
================================================== =
marina:/var/certs# openssl req -new -x509 -days 365 -nodes -config /etc/monit.cnf -out /var/certs/monit.pem -keyout /var/certs/monit.pem
error on line -1 of /etc/monit.cnf
18752:error:02001002:system library:fopen:No such file or directory:bss_file.c:104:fopen('/etc/monit.cnf','rb')
18752:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:107:
18752:error:0E064072:configuration file routines:CONF_load:no such file:conf_def.c:197:

Thanks for your assistance

falko 2nd December 2006 16:32

/etc/monit.cnf doesn't exist. You must create it before you run the command.

kdclaver 13th December 2006 10:12

How must I create this file ? Must I do it manually ? if yes which are the rights I will put on it 777, 644 ?????

Thank you for your assistance.

falko 14th December 2006 19:52

Why don't you just use /var/certs/monit.cnf as shown in the tutorial?


vi /var/certs/monit.cnf

# create RSA certs - Server

RANDFILE = ./openssl.rnd

[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type

[ req_dn ]
countryName = Country Name (2 letter code)
countryName_default = MO

stateOrProvinceName            = State or Province Name (full name)
stateOrProvinceName_default    = Monitoria

localityName                    = Locality Name (eg, city)
localityName_default            = Monittown

organizationName                = Organization Name (eg, company)
organizationName_default        = Monit Inc.

organizationalUnitName          = Organizational Unit Name (eg, section)
organizationalUnitName_default  = Dept. of Monitoring Technologies

commonName                      = Common Name (FQDN of your server)
commonName_default              =

emailAddress                    = Email Address
emailAddress_default            =

[ cert_type ]
nsCertType = server


openssl req -new -x509 -days 365 -nodes -config ./monit.cnf -out /var/certs/monit.pem -keyout /var/certs/monit.pem
openssl gendh 512 >> /var/certs/monit.pem
openssl x509 -subject -dates -fingerprint -noout -in /var/certs/monit.pem
chmod 700 /var/certs/monit.pem

All times are GMT +2. The time now is 04:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.