Enabling Email alerts return "Error: No config item"

Thank you @murrant, that worked. I can report that I am able to enable email alerts now without issue. I have successfully sent a test alert via smtp.

The issue remains with “Enable dynamic graphs” and changing the geocoding engine.

That worked! Thanks for sticking with this @murrant!

@crispyjones I went through and verified all the config table entries.

Running ./daily.sh and the seeder should fix you up now.

1 Like

That did it, everything works now, thank you @murrant!

Hi @murrant I’m still having this issue even after having done ./daily.sh and php artisan db:seed --class=DefaultConfigSeeder what should I do more ?

====================================
Component | Version
--------- | -------
LibreNMS  | 1.47-101-gafedb034d
DB Schema | 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP       | 7.2.10-0ubuntu0.18.04.1
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.8.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Thanks!

What issue? There were 4 described in this thread.

Yes, sorry. When I switch on the “Enable email alerting” option

Then you have some other issue, because the seeder will absolutely fix that. Is your .env file correct?

This should look like something like this I guess ?
Other functions seem to work properly though.

APP_KEY=base64:XXXXXX

DB_HOST=localhost
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=XXXXXX

#APP_URL=
NODE_ID=XXXXX
DB_PORT=3306
LIBRENMS_USER=librenms

were you able to resolve this problem? i still have the same issue.

@murrant I’m still seeing this issue even after running the ./daily.sh and php seeder.

Here are the contents of my select * from config where config_name like '%mail%';

Appreciate any help.

Also, validate.php here –

====================================

Component Version
LibreNMS 1.48
DB Schema 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP 7.2.10-0ubuntu0.18.04.1
MySQL 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.8.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

I had also “No config item” issue when trying to enable email alerts. I did run daily.sh and then re-seeded configs but that didn’t work. Then I looked @murrant’s PR on Github and compared DefaultConfigSeeder.php there to mine. Looks like daily.sh didn’t update mine so re-seeding didn’t have any effect.

Then I just created that config item manually like this
INSERT INTO config (config_name, config_value, config_default, config_descr, config_group, config_group_order, config_sub_group, config_sub_group_order, config_hidden, config_disabled) VALUES ("alert.transports.mail", false, false, "Mail alerting transport", "alerting", 0, "transports", 0, 0, 0);

After this I was able to enable alerts. All this was with new installation on Ubuntu 18.04.1.

3 Likes

This worked perfectly for me, thank you very much!! :slight_smile:

Thank you, that worked! @orrrrn

Thanks man!

You are probably on the monthly release. The fix is in 1.48, so you can just run the seeder again.

I’m still running in the exact same issue here. Out of curiosity, what do you mean by : “… The fix is in 1.48, so you can just run the seeder again…”


root@librenms:/opt/librenms# ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.48-4-gf13caae2e
DB Schema | 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP       | 7.2.10-0ubuntu0.18.04.1
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.8.3
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
root@librenms:/opt/librenms# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
root@librenms:/opt/librenms# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

root@librenms:/opt/librenms# php --version
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
root@librenms:/opt/librenms#

[edit] …learning MD [/edit]

php artisan db:seed --class=DefaultConfigSeeder

Murrant, thank you for your prompt answer. I’m afraid this did not solve the issue described. When enabling “Alerting settings >> Email options >> Enable email alerting” the GUI still reports “ERROR: No config item”. What am I missing here?


Updating to latest codebase                        OK
Updating Composer packages                         OK
Updated from c4ca7a4f1 to 65e766156                OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK


librenms@librenms:~$ php artisan db:seed --class=DefaultConfigSeeder
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes


librenms@librenms:~$ ./daily.sh
Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK


librenms@librenms:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.48.1-2-g65e766156
DB Schema | 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP       | 7.2.10-0ubuntu0.18.04.1
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.8.3
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

What is the output for php artisan db:seed --class=DefaultConfigSeeder --force -vvv