Ad Widget

Collapse

Error:"No Media defined for user" After configuring the media to user.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suuresh8899
    Junior Member
    • Nov 2019
    • 7

    #1

    Error:"No Media defined for user" After configuring the media to user.

    Hi Team,

    I have configured the media type email and also created the user and assigned the media. created the action to trigger the mail, but when problem occurs it is not send the mail.

    I have tested the media type be test mail it is working fine.

    can some one help to resolve the issue.

  • suuresh8899
    Junior Member
    • Nov 2019
    • 7

    #2
    Hi Team,

    Can some one help to resolve the issue.

    Thanks in advance

    Comment

    • Roger Penn
      Junior Member
      • Feb 2020
      • 3

      #3
      I am having this same issue. Both users have the media defined and both are getting the same error. Email sends fine via the test mail. Would really like to know what is going on because this whole thing is useless if we can't get notification when things go wrong. Click image for larger version

Name:	media.png
Views:	20453
Size:	30.3 KB
ID:	395469

      Comment


      • Atsushi
        Atsushi commented
        Editing a comment
        Is the user or user group set as the destination for operation in the action settings?
    • Roger Penn
      Junior Member
      • Feb 2020
      • 3

      #4
      Click image for larger version

Name:	media2.png
Views:	20181
Size:	47.0 KB
ID:	395528 Yes, they are.

      Comment

      • fittim
        Junior Member
        • Apr 2016
        • 15

        #5
        The same is happening for me after upgrading Debian Stretch to Buster. Literally nothing changed in the configuration and the media is defined properly. I tried to specify the user group or a single user with this bug as destination for the operation in the action but both is not working.
        Anyone found a solution? Zabbix 4.0 LTS here

        Comment

        • Roger Penn
          Junior Member
          • Feb 2020
          • 3

          #6
          Originally posted by fittim
          Anyone found a solution?
          We found a solution: Zenoss.

          Comment

          • FauP
            Junior Member
            • Apr 2020
            • 6

            #7
            Hi,

            The same is happening at me, my scenarios is a new installation of Zabbix 4.0.19 (CentOS 7.6). The email on section media of users is ok.
            Who has found a solution for Zabbix 4.0 LTS?

            Thanks

            Comment

            • tim.mooney
              Senior Member
              • Dec 2012
              • 1427

              #8
              FauP since yours is a new installation, the problem is almost certainly that you don't have your actions set up properly.

              The first thing you should look at is to make sure that your trigger(s) are actually detecting a problem, based on the thresholds you have configured. When there's a problem, does it show up in Monitoring->Dashboard? Have the problems you believe should have generated alerts shown up in Monitoring->Problems? If not, that means the problem is with your trigger(s), as no problem is being detected. You need to examine your thresholds and your trigger expressions to determine why the trigger isn't firing when you believe it should be.

              If you can see that Zabbix is detecting the problem, such as when a current problem shows up in Monitoring->Dashboard or a previous problem shows up in Monitoring->Problems, then the next thing to check is the "Actions" column in either of those views. Is "Actions" blank? If it is, then you have the situation that your Zabbix triggers detected a problem but no Action that you have defined matched the conditions for taking action, so Zabbix took no action. In that case, you need to review your defined Actions, in particular the conditions, to determine why the Action didn't match.

              If instead of the Actions field being blank, there's something in the field, then mouse over it to get Zabbix to expand the information about what Actions it took. If there's anything colored red there, then Zabbix attempted to take an action, but something failed. The error message may provide more detail, or you may need to review things like email logs, etc.

              So, which scenario are you facing? Your triggers aren't even detecting a problem? Or problems are being detected but actions are not being taken?

              Comment

              • FauP
                Junior Member
                • Apr 2020
                • 6

                #9
                tim.mooney Thank you for your answer.
                Yes, the triggers work correctly and are displayed in the dashboard and in Monitoring-> Problems.

                I also configured the action to send email to a group and a single user as you can see from the screenshots.
                Click image for larger version

Name:	Annotazione 2020-04-20 101540.jpg
Views:	21841
Size:	173.0 KB
ID:	399605
                Attached Files

                Comment

                • FauP
                  Junior Member
                  • Apr 2020
                  • 6

                  #10
                  .... tim.mooney Thank you for your answer (sorry I'm new in the forum).
                  Yes, the triggers work correctly and are displayed in the dashboard and in Monitoring-> Problems.

                  I also configured the action to send email to a group and a single user as you can see from the screenshots.
                  I have also configured the action to send email to a group and a single user as you can see from the screenshots, but in the dashboard I always find the alarm that the email is not defined for users.
                  How can I solve the problem?

                  Thanks TIM
                  Last edited by FauP; 20-04-2020, 10:36.

                  Comment

                  • tim.mooney
                    Senior Member
                    • Dec 2012
                    • 1427

                    #11
                    Your triggers are detecting problems and generating events, so the problem is not with your triggers. Thanks for providing that information, to rule out the triggers.

                    I understand the need to obscure parts of the screenshots, but that does make it more difficult to spot what the problem is. However, based on how wide certain obscured fields are, there's something I want you to check.

                    In the first screenshot you posted, with the Media setup for a particular user, the Type of media is just "Email".

                    In the Action->Operations screenshot, in the Operation details area the "Send only to" box is set to something that looks like a different media type, "Email SOMETHING_OBSCURED SaaS". That appears to be a different media *type*.

                    In other words, your user is configured to have just one media type, "Email", but your Action is trying to send to both the group and the user via the "Email SOMETHING_OBSCURED SaaS" media type. I'm pretty sure that's why you're getting the "No media defined for user."

                    If you want to use your Action exactly as it's configured, then you need to give the user (and user group) the additional media type "Email SOMETHING_OBSCURED SaaS".

                    Alternately, you need to modify your Operation conditions to use the Media type "Email", instead of "Email SOMETHING_OBSCURED SaaS".

                    I don't know which one is correct for your environment, but if you use "Send Only to" in an operation condition in an action, then that exact media type has to be one that your users have assigned to them.

                    Comment

                    • FauP
                      Junior Member
                      • Apr 2020
                      • 6

                      #12
                      Ok tim.mooney , Thanks for your suggests, I think have found a problem. For each users I need change media Type, I must select the new action "Email SOMETHING_OBSCURED SaaS" and not default "Email".

                      Now I have the system without connectivity to SMTP server, but now don't have the error message "Failed. No media defined for user".
                      The new message on Monitoring->Problems->Action is "In progress, 3 retries left", but I don't see any TCP requests coming out of Zabbix to the SMTP Server.
                      I hope to complete my test tomorrow by connecting to the SMTP Server.


                      Is there a log file to view email sending activities?

                      Comment

                      • tim.mooney
                        Senior Member
                        • Dec 2012
                        • 1427

                        #13
                        If you increase the DebugLevel setting for zabbix_server and restart, it might log additional debug information in the zabbix_server.log file. Another option you could try (more work initially than setting the DebugLevel, but less extra log messages in the zabbix_server.log) is to use the "-R log_level_increase=<replace with the pid of your alerter processes>", after using the "ps" command to find the PIDs for the alerter processes. That effectively increases the debug level of just those processes, rather than everything, so there's fewer messages written to the log file. Either method should work, but the second method is more difficult to use until you're familiar with how it works.

                        If the media type for "Email SOMETHING_OBSCURED SaaS" is what you should be using, instead of the built-in Email type, then you also should review the Administration->Media Types area and look at how that media type is configured. That will likely give you some clues about what exactly that custom media type is doing. For example, it might be trying to hand off email to a mail transfer agent (MTA) like sendmail or postfix that's running right on your Zabbix server. In that case, most of the interesting logs are going to be the sendmail or postfix logs on your Zabbix server.

                        Or, the custom media type might be trying to connect to a remote email server like Google or Office365. In that case, there won't be any local email logs, but there might be something about the connection in the Zabbix logs (especially with debugging enabled).

                        Also, recent versions of Zabbix have a "Test" link in the far right of the Media Types screen (where all your media types are listed). You should definitely try that, to test that your custom media type is able to connect to whatever service it's trying to use to deliver alerts.

                        Comment

                        • FauP
                          Junior Member
                          • Apr 2020
                          • 6

                          #14
                          Hi tim.mooney , problem solved!
                          The connection with the SMTP server has been restored and the emails have been sent.

                          "Also, recent versions of Zabbix have a "Test" link in the far right of the Media Types screen (where all your media types are listed). You should definitely try that, to test that your custom media type is able to connect to whatever service it's trying to use to deliver alerts."
                          ... from which version?

                          Comment

                          • tim.mooney
                            Senior Member
                            • Dec 2012
                            • 1427

                            #15
                            I'm glad you got it working!

                            It appears that the "Test" media link was added with the 4.2.x series (which is no longer supported), see https://www.zabbix.com/rn/rn4.2.0

                            It's present in 4.4.x (my site is currently running 4.4.7), and I assume will be present in 5.0 when that is released. The 5.0 series will be another long term support (LTS) release, so probably wait for that to be released and for a couple of point releases (5.0.1, 5.0.2) before upgrading.

                            Comment

                            Working...