Also as I just installed monit service on one host …

Comment on Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes by admin.

Also as I just installed monit service on one host with Debian Squeeze I can confirm. Config is working fine with Debian Squeeze shipped monit version:

pcfreak:~# dpkg -l |grep ‘^ii monit’
ii monit 1:5.1.1-1 A utility for monitoring and managing daemons or similar programs

admin Also Commented

Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes

If you have more than one server that you need to monitor, then you can use M/Monit– an extended version of Monit that provides a simple way to monitor multiple machines.


Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes
Also the monitrc config from my article is configured to check and report for “disk full” and low disk space on /dev/md0 which used to be a software mirror type RAID1. Therefore config in monitrc reads:


check device disk1 with path /dev/md0

On other non-RAIDed disks, usually the disk to monitor is /dev/sda1 or /dev/sdb1

Thus if you’re not using a hardware or software mirror probably this config section should be substituted with:
check device disk1 with path /dev/sda1, i.e.:


check device disk1 with path /dev/sda1


Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes
Also i’ve figured out later. This alerts as I configured in this article might be sometimes really annoying if you receive e-mails every few seconds. Hence it might be good idea to comment alerts in my monitrc sample conf:

To do so, remove or comment lines in Apache and MySQL monit config section:


## if cpu usage is greater than 80 percent for 3 cycles then alert


## if cpu is greater than 50% for 2 cycles then alert


Recent Comments by admin

How to make Samba smbfs / cifs mount share location with user / pass credentials authenticate via file stored credentials

♦ Also, If you need to join a Linux Samba Server to a Windows Domain from the Windows domain using the net command run:

$ net join -w WINDOWS-DOMAIN -s ' win-server' -U Administrator%password

♦ You can then list the users in the Windows domain using wbinfo command

$ wbinfo -u


How to make Samba smbfs / cifs mount share location with user / pass credentials authenticate via file stored credentials

♦ Something else I forgot to mention in article, If it happens that some samba pass credential has been lost it is useful to change samba user password with command:

 smbpasswd smbusername

♦ To create a samba entry for an existing system user, use the pdbedit command:

if it is needded to add a complete new unexisting user to the samba users do:

 smbserver:~# pdbedit -a NewSmbUserName

By default samba server password database (if not changed to another location in smb.conf is stored on server) under:

/var/lib/samba/private/passdb.tdb


How to make Samba smbfs / cifs mount share location with user / pass credentials authenticate via file stored credentials
One small hint in case if you have no password protection for a share and want to avoid the annoying pasword samba prompt the way to do it is like so:  
smbclient -U% //192.168.1.2/My_Folder

Once connected you can use Linux commands to list and travel between files.

File transfer with smbclient is also possible by  using get, put, mget, and mput commands.


Display Content of SSL certificate .pem file with openssl command
One other tip here is How to generate a new .pem assuming you have .key and .pem files already generated already with command:

 openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout ejabberd.key -out ejabberd.crt

Once the whatever.key and whatever.pem files are existing just cat each of them to prepare a new .pem file

cat whatever.pem >> whatever-new.key
cat whatever.key >> whatever-new.pem

Now you can use your whatever-new.pem with some service and enjoy.
 


How to delete million of files on busy Linux servers (Work out Argument list too long)

If you need to delete a pattern contained in all files (e.g. delete just some of the files) you can use this command: cd /path/to/directory/; find . -type f -mtime +5 -print |grep -i 'WF_LOG_'| xargs rm -f


Share this on:

No Responses to “Also as I just installed monit service on one host …”

  1. Mr WordPress says:
    Unknown Unknown Unknown Unknown

    Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.

    View CommentView Comment