Issue alerts to sysContact for specific devices

Hi,

I’m having issues with Alerts/Transports. I would like to send alerts for specific devices to a specific mail-contact, but I cannot manage to get this to work, we are using LDAP integrated-accounts.

Whenever i switch off “Send alerts to default contact only” the following happens:

  • Testing SMTP-transport results in no mails going forward, in which they do when the setting is turned on.
  • Alerts does not get issued for devices which does not have a overridden syscontact-mail. I see the following SMTP error in the device’s logs:
    “Could not issue critical alert for rule ‘Devices up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.”

Is it supposed to be this way? Shouldn’t the alerts be issued to the default-contact when no syscontact is specified?

This is from the latest commit:
bash-4.2$ /data/librenms/validate.php
LibreNMS | 1.36-9-g8000e8a

No one will know as you’ve not provided any of your alerting config options.

Hi,

See from link below:

I have greyed out SMTP-settings as they are verified.

Thought it didn’t really matter since I’ve tried to turning everything off except this one setting and it still works. As fast as this setting is turned off i cannot send test-mails or alert notifications.

As it was asked more like a question if this is the way it works or not, I’m guessing alerts should be issued to the default-contact when no syscontact is specified?

You have “Send alerts to default contact only” switched on, which would think that its only going to send email to default contact in that box only and nothing else.

Hi,

Correct. The following happens

  • When i switch this off my mail transport does not work anymore
  • When i switch this off no alert notifications is sent out

Questions. If this setting is turned off

  • Am i supposed to, in Alert settings for each device, specify what the contact will be for this device?
    • Should alert notifications go out to the default contact if none is specified to each device?

Sounds like you have no email address attached to the user’s accounts in your librenms server.

No, you don’t need to configure each device for contact.

The way I do it I make an account for each user and I add their email address to the user account.

Hi,

Thank you for the reply!

That sounds like somthing. As we are using AD-integrated login, can i see this anywhere from the server-side? No users are listed in “Edit User” https://imgur.com/a/BRZMt

  • Are there any way to get all accounts with login-right listeds in the Librenms API?
    • To me it doesn’t matter if it doesn’t solve what i want to do, I just want to be able to send out alert to specific contacts.
    • Every device except A one should send out notifications to Default Contact
      • What should i do?

Have you tried any of the debugging we have in the docs for alerts? Post the output of what you tried.

Hi,

Yes i did, very helpful but will skip posting this output since I managed to fix this.

Problems was binduser was not configured and I could not see any users. With this fixed I’ll manage to set this configuration as I want.

Thank you for your help guys!

1 Like