Ad Widget

Collapse

mail problem. suckerd not logging properly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • davidtee
    Junior Member
    • Aug 2005
    • 3

    #1

    mail problem. suckerd not logging properly

    I have been having some problems with email alerts with zabbix 1.0

    I am running on fedora core 3 / red hat enterprise linux.

    Mails are attempted being sent, but i get the messages

    Aug 9 00:26:35 xxhostxx sendmail[28291]: NOQUEUE: connect from xxhostxx [127.0.0.1]
    Aug 9 00:26:35 xxhostxx sendmail[28291]: AUTH: available mech=LOGIN ANONYMOUS PLAIN DIGEST-MD5 CRAM-MD5, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
    Aug 9 00:26:35 xxhostxx sendmail[28291]: j78NQZ0M028291: Milter: no active filter
    Aug 9 00:26:35 xxhostxx sendmail[28291]: j78NQZ0M028291: --- 220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Tue, 9 Aug 2005 00:26:35 +0100
    Aug 9 00:26:35 xxhostxx sendmail[28291]: j78NQZ0M028291: <-- QUIT
    Aug 9 00:26:35 xxhostxx sendmail[28291]: j78NQZ0M028291: --- 221 2.0.0 localhost.localdomain closing connection
    Aug 9 00:26:35 xxhostxx sendmail[28291]: j78NQZ0M028291: xxhostxx [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

    in the /var/log/maillog file every time one is attempted to be sent.

    The log for zabbix_suckerd does not even show any mail activity even when debug is set to level 4 for zabbix_suckerd.

    I have hacked the code to dump zabbix logs to stderr or a separate file editing include/functions.c but no file is created at all....

    it is as if the mailer part of zabbix_suckerd connects to the sendmail port on localhost and then just issues a quit command.....

    I have tried changing the email to a script -

    /usr/local/zabbix/bin/alertscripts/sendmail.sh

    ----
    #!/bin/bash

    echo "$3" | mail -s "$2" "$1"
    ----

    and have set the directory /usr/local/zabbix/bin/alertscripts in the file /etc/zabbix/zabbix_suckerd.conf

    Why is suckerd not logging properly?

    And why are my mails not being sent?

    zabbix_suckerd.conf:
    -----
    # This is config file for zabbix_suckerd
    # To get more information about Zabbix,
    # go http://zabbix.sourceforge.net

    ############ GENERAL PARAMETERS #################

    # Number of pre-forked instances of zabbix_suckerd
    # Default value is 5
    # This parameter must be between 5 and 255
    StartSuckers=5

    # How often Zabbix will perform housekeeping procedure
    # (in hours)
    # Default value is 1 hour
    # Housekeeping is removing unnecessary information from
    # tables history, laert, and alarms
    # This parameter must be between 1 and 24

    HousekeepingFrequency=1

    # How often Zabbix will try to send unsent alerts
    # (in seconds)
    # Default value is 30 seconds
    SenderFrequency=30

    # Uncomment this line to disable housekeeping procedure

    #DisableHousekeeping=1

    # Specifies debug level
    # 0 - debug is not created
    # 1 - critical information
    # 2 - error information
    # 3 - warnings (default)
    # 4 - for debugging (produces lots of information)

    DebugLevel=3

    # Specifies how long we wait for agent (in sec)
    # Must be between 1 and 30
    Timeout=5

    # Name of PID file

    PidFile=/var/tmp/zabbix_suckerd.pid

    # Name of log file
    # If not set, syslog is used

    LogFile=/tmp/zabbix_suckerd.log

    #Location for custom alert scripts
    #AlertScriptsPath=/home/zabbix/bin/
    AlertScriptsPath=/usr/local/zabbix/bin/alertscripts

    #Location of 'fping. Default is /usr/sbin/fping
    #FpingLocation=/usr/sbin/fping

    # Frequency of ICMP pings. Defauls is 30 second.
    #PingerFrequency=30

    # Database host name
    # Default is localhost

    #DBHost=localhost

    # Database name

    DBName=zabbix

    # Database user

    DBUser=root

    # Database password
    # Comment this line if no password used

    #DBPassword=<password>

    # Connect to MySQL using Unix socket?

    #DBSocket=/tmp/mysql.sock
    DBSocket=/var/lib/mysql/mysql.sock

    # Experimental options. Use with care !

    # Get rid of sockets in TIME_WAIT state
    # This will set socket option SO_LINGER
    # NoTimeWait=1
  • davidtee
    Junior Member
    • Aug 2005
    • 3

    #2
    Switched to Postfix MTA.. still trouble! please help!

    I switched the MTA to postfix to see it would help things at all... it didn't. the maillog now reads like this when zabbix tries to send out a mail:

    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: connect from localhost.localdomain[127.0.0.1]
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: > localhost.localdomain[127.0.0.1]: 220 gc3.localdomain ESMTP Postfix (2.1.5)
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: watchdog_pat: 0xa064cb8
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: vstream_fflush_some: fd 12 flush 43
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: vstream_buf_get_ready: fd 12 got 5
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: < localhost.localdomain[127.0.0.1]: QUIT
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: > localhost.localdomain[127.0.0.1]: 221 Bye
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: vstream_fflush_some: fd 12 flush 9
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: vstream_fflush_some: fd 12 flush 0
    Aug 9 13:20:11 gc3 postfix/smtpd[5610]: disconnect from localhost.localdomain[127.0.0.1]

    could it be zabbix did not compile correctly? the zabbix logs do not show any attempts to send mails, but its definately zabbix trying to send the mails.

    David

    Comment

    • davidtee
      Junior Member
      • Aug 2005
      • 3

      #3
      fixed

      Ok My mistake,

      the reason i thought zabbix was trying to send mails and failing was simply due to the fact that zabbix was polling the mailserver on the local monitored host, connecting and quitting.....

      I had not quite set up alerts properly... everything seems to run smoothly now...

      The one question i do have remaining however is why, zabbix_suckerd is not logging when it sends email, even at log level 4?

      David

      Comment

      Working...