We have a Dell PowerEdge T610 running XenServer (free) with 3 WinServ08 R2 and I monitor the servers via XenCenter.Īll is well, but I would like to know if the following are possible and where to find info: I took a job at a start up and I am now in charge of IT as well as development. ![]() New Monit guides will be posted for monitoring different services.I am a developer that knows a bit about server config/admin. Now open a browser and go to your local ip with https not http: and enter your log in credentials (in the example htpc with password guides) to make sure the base install of Monit is working. Then restart Monit sudo service monit restart You should see the OK below, if you don't it's ok, it probably means you are on Debian Jessie or Ubuntu 15.x and later Control file syntax OK Test monit syntax is correct for the configuration file sudo monit -t Modify permissions of the new monit configuration to avoid this error The control file '/etc/monit/monitrc' must have permissions no more than -rwx- (0700) right now permissions are -rw-r-r- (0644).įix the permissions sudo chmod 0700 /etc/monit/monitrc # allow # allow dynamicdns address to connectĪllow htpc: "guides" # require user htpc with password guides Set httpd port 2812 address 0.0.0.0 # allow port 2812 connections on all network adaptersĪllow 0.0.0.0/0.0.0.0 # allow all IPs, can use local subnet too ![]() # set alert #email address which will receive monit alerts #http settings # from: subject: monit alert - $EVENT $SERVICE Slots 100 # optionally limit the queue size set daemon 60 #check services every 60 secondsīasedir /var/lib/monit/events # set the base directory where events will be stored If you don't use Dynamic DNS then comment that line out with a # symbol. You should change the allow htpc: guides to the username and password you want to use to access Monit. This will effectively whitelist only your home IP to access Monit. If you do use free Dynamic DNS then comment out the allow 0.0.0.0 line by preceding with # and uncomment (remove #) for the allow line. The http settings are for setting the port and address for Monit to listen on This is disabled by default so remove the # to enable it. Set alert to the email address you wish to receive the monit emails on, when using Google set it to allow insecure apps (other solutions here). Set the username “htpc” and password “guides” to your gmail credentials ![]() You will need to uncomment the lines under Mail settings by deleting the # to activate them This Monit configuration assumes you are using a gmail account for sending and receiving notifications Paste the block below while making appropriate changes Open the Monit configuration sudo nano /etc/monit/monitrc This command changes the permissions of the monit ssl certificate sudo chmod 0700 /var/certs/monit.pem Install Monit from RepositoryĮasy as always straight from the repository sudo apt-get install monit -yīackup the old Monit configuration sudo mv /etc/monit/monitrc /etc/monit/monitrc.bak etc/monit/monitrc:124: Error: SSL server PEM file permissions check failed 'allow' Modify the permissions to prevent this error monit: The SSL server PEM file '/var/certs/monit.pem' must have permissions no more than -rwx- (0700) right now permissions are -rw-r-r- (0644). sudo openssl req -new -x509 -days 365 -nodes -out /var/certs/monit.pem -keyout /var/certs/monit.pem If you want to increase the validation period increase 365 to something like 36500 (100 years). Generate a key, you can enter the information it prompts for if you want but it is not necessary, you can just leave it blank. Install OpenSSL sudo apt-get install openssl -yĬreate certs folder sudo mkdir -p /var/certs We need an SSL certificate for Monit in order to look at the Monit web interface securely. I have already prepared a thorough guide for most media server programs posted here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |