Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Alerts not working

    Posted by bgent on diciembre 4, 2006 at 22:02

    Can someone help me configure my Pandora server to send alerts to an email address when the parameters are set? I have an alert set to an agent and to a module for the agent, but when the module fails an email is not sent. Any help would be greatly appreciated.

    Sancho replied 18 years, 2 months ago 4 Members · 13 Replies
  • 13 Replies
  • Sancho

    Administrator
    diciembre 5, 2006 at 13:19
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Can someone help me configure my Pandora server to send alerts to an email address when the parameters are set? I have an alert set to an agent and to a module for the agent, but when the module fails an email is not sent. Any help would be greatly appreciated.

    Check that command pre-configured for email alert is working on your system. Do you have sendmail installed on it?. Check manually the command and rewrite if needed (different parameters or different command)

  • bgent

    Member
    diciembre 6, 2006 at 23:34
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I have changed the command to read: echo Field3 | mail -s Field2 Field1
    Field1=email address
    Field2=Subject
    Field3=Text of Message

    When I run this from the command line it sends the email correctly, but the Agent Detail view always shows that the Status shows “at least one monitor fails” (Red Lightbulb) and the Alerts shows: “Alert not fired” (Green Circle)

    Is there a setting to manually fire the alerts? Or where is the setting to automatically fire the alerts?

    I want Pandora to ping a server, if it can’t reach the server then send an email. Settings are as follows:

    Agent settings:
    Module:remote_icmp_pr Module group1
    Module namePING Module Interval60
    Target IPxx.xx.xxx.xx TCP port0
    SNMP OID Get Value SNMP Community
    SNMP OID
    TCP send TCP receive
    Minimum Data0 Maximum Data0
    Comments

    Alert settings:
    Alert type1
    Min value0 Max value 0
    DescriptionServer Down
    Field #1 (Alias, name)user@mydomain
    Field #2 (Single Line)RTP Down
    Field #3 (Full Text)Check server
    Time threshold300 Other
    Min. number of alerts0 Max. number of alerts 0
    Assigned module remote_icmp_proc

  • Sancho

    Administrator
    diciembre 10, 2006 at 01:15
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    I have changed the command to read: echo Field3 | mail -s Field2 Field1
    Field1=email address
    Field2=Subject
    Field3=Text of Message

    Have you tried this command using www-data (or equivalent) user ?, if it’s working, let’s go to another issue…

    When I run this from the command line it sends the email correctly, but the Agent Detail view always shows that the Status shows “at least one monitor fails” (Red Lightbulb) and the Alerts shows: “Alert not fired” (Green Circle)

    Is there a setting to manually fire the alerts? Or where is the setting to automatically fire the alerts?

    I want Pandora to ping a server, if it can’t reach the server then send an email. Settings are as follows:

    Agent settings:
    Module:remote_icmp_pr Module group1
    Module namePING Module Interval60
    Target IPxx.xx.xxx.xx TCP port0
    SNMP OID Get Value SNMP Community
    SNMP OID
    TCP send TCP receive
    Minimum Data0 Maximum Data0
    Comments

    Alert settings:
    Alert type1
    Min value0 Max value 0
    DescriptionServer Down
    Field #1 (Alias, name)user@mydomain
    Field #2 (Single Line)RTP Down
    Field #3 (Full Text)Check server
    Time threshold300 Other
    Min. number of alerts0 Max. number of alerts 0
    Assigned module remote_icmp_proc

    You need to setup max / min value, for example
    min 1, max 1. Another value below min or above max, will fire alert.

    Max number of alerts needs to be defined. If timethreshold is 300, you could try with “2”.

    Try again and tell us if works for you.

  • bgent

    Member
    diciembre 11, 2006 at 22:38
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    OK-I setup the max/min values and now the screen shows that the alert is being fired:

    Type: eMail
    Name: PING
    Description: Server Down
    Min/Max: 1/1
    Time threshold: 300
    Last fired: 2006-12-11 10:30:13
    Times Fired: 29
    Status: red light

    Have you tried this command using www-data (or equivalent) user ?, if it’s working, let’s go to another issue…

    I have tried this command from the command line and it works, but I don’t understand what you mean by “using www-data…”

  • Sancho

    Administrator
    diciembre 13, 2006 at 06:22
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    OK-I setup the max/min values and now the screen shows that the alert is being fired:

    Type: eMail
    Name: PING
    Description: Server Down
    Min/Max: 1/1
    Time threshold: 300
    Last fired: 2006-12-11 10:30:13
    Times Fired: 29
    Status: red light

    Have you tried this command using www-data (or equivalent) user ?, if it’s working, let’s go to another issue…

    I have tried this command from the command line and it works, but I don’t understand what you mean by “using www-data…”

    Yep, my fault, actually alerts are executed by Pandora Server, so if you execute with Root privileges, be sure that this command (sendmail…) works for thir user.

  • bgent

    Member
    diciembre 14, 2006 at 04:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yep, my fault, actually alerts are executed by Pandora Server, so if you execute with Root privileges, be sure that this command (sendmail…) works for thir user.

    I am logged in as root on the server to test the system and admin on the pandora console interface.

  • raul

    Member
    diciembre 14, 2006 at 12:15
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yep, my fault, actually alerts are executed by Pandora Server, so if you execute with Root privileges, be sure that this command (sendmail…) works for thir user.

    I am logged in as root on the server to test the system and admin on the pandora console interface.

    The user that sends the mails is the same user that runs the Pandora Server Perl Script, so this user is the one who needs to have the privileges.

    www-data user is the default user on Debian that runs the Apache Web Server.

    Raul

  • manu

    Member
    diciembre 14, 2006 at 12:37
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    On RH systems the default user is apache, and, by default, it has not any chance of send emails. So check it again.

  • bgent

    Member
    diciembre 14, 2006 at 22:38
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I think I am in over my head. I am running Fedora Core 6, I am using postfix. I am not sure how to check/change the settings based on your suggestions:

    On RH systems the default user is apache, and, by default, it has not any chance of send emails. So check it again.

    &

    The user that sends the mails is the same user that runs the Pandora Server Perl Script, so this user is the one who needs to have the privileges.

    Like I said before, the command I have in the alert email is:
    echo Field3 | mail -s Field2 Field1
    Field1=email address
    Field2=Subject
    Field3=Text of Message
    and this works from the command line when logged in as root. Do I need to allow PHP to use postfix to send the alerts, and if so how?

  • bgent

    Member
    diciembre 14, 2006 at 22:57
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Or, how do I allow apache to send mail?

  • manu

    Member
    diciembre 15, 2006 at 12:39
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Errr…why don´t you run pandora server with the pandora user? For sure, pandora user will be able to use the mail command.
    I´m running it on a FC6 at home, too, and it works for me without a problem 🙂

  • bgent

    Member
    diciembre 15, 2006 at 22:58
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    It’s working!!! Thanks manu, raul, and nil for all your help.

  • Sancho

    Administrator
    diciembre 18, 2006 at 13:04
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    It’s working!!! Thanks manu, raul, and nil for all your help.

    Fine ! 🙂