The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

No Logwatch emails anymore?

Discussion in 'E-mail Discussions' started by mstuebner, Mar 11, 2008.

  1. mstuebner

    mstuebner Well-Known Member

    Joined:
    May 13, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I noticed that since the 28. Febr. I do not receive Logwatch emails anymore but also do not know what process caused them to be send, as the root-cron doesn't mention anything about Logwatch.

    Any hint? Thanx, Matthias
     
  2. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    I don't seem to be getting them anymore either, how can I reinstate those?
     
  3. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    You should primarily search for its installation folder and analyze its config.

    If you have it installed properly, you should be able to run the cxommand "Logwatch" ath the SSH command line and if it is working, you'll see that in about 30-40 seconds the process ends and if the conf file is defining an email address to send reports, you should receive that report via mail.

    If you receive the report, then check the daily crontab, run this:

    Code:
    cd /etc/cron.daily;dir
    if you see an item about "0logwatch", you can simply test the sanity of this link by simply "less 0logwatch" (you'll view the source code of Logwatch). Tell what is the version you have installed, look at one of the first lines of code that contains "my $Version =". 7.3.6 is the last version.

    If you can run the executable and see the code thru the cron folder, you maybe need to check the configuration looking for the address to which it is sending reports (commonly: root). If, although, it used to work in the past, its cron probably was deleted from crontab by some reason.

    At the SSH run:
    Code:
    find / -name logwatch.conf
    You'll find the conf file that need to be opened and checked. Look for the "MailTo =" and check if the destination email is correct. Usually you'll find two locations for the logwatch.conf file, being what you need the one located at /etc/logwatch/conf/logwatch.conf


    Be aware of old installations of Logwatch since they changed the locations for the common folders and I just did a mess when "upgrading" last month. If you want to reinstall/upgrade it's a good idea to delete all the actual files and do a clean install.

    How to install Logwatch:

    At the command line via SSH run these commands.

    wget ftp://ftp.kaybee.org/pub/linux/logwatch-7.3.6.tar.gz
    tar zxf logwatch-7.3.6.tar.gz
    cd logwatch-7.3.6
    chmod 755 install_logwatch.sh
    ./install_logwatch.sh

    Read very carefully the files "HOWTO-Customize-LogWatch" and "README". ;)

    Best Regards
     
  4. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    Thanks! Its working now:
    sshd:
    Authentication Failures:
    root (61.4.191.84): 54 Time(s)


    I had to edit the conf file, it had email going to root.
     
  5. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can change the email destination, or if it is "root" you may assign a final destination for "root" in your WHM, under Server Contacts > Change System Mail Preferences ;)
     
Loading...

Share This Page