Unable to create/edit/delete alerts

Hello,

during night our virtual machine with librenms crashed due to no free space on hdd.
We fixed it and now everything look like its working except rules.

When i try to create rule, i dont see those fancy filter options:

when i click on save rule, nothing happens.
when i click on edit on some existing rule, i get exactly same window (with predefined “aa” in rule name)
when i try to delete rules, i get ajax post failed; unable to delete alert rule

Everything else look like its working, i can add/remove devices, rrds and graphs are updated continually.

in librenms.log i got only these messages:
/opt/librenms/poller.php 14 2020-04-03 14:55:35 - 1 devices polled in 32.26 secs

validate looks ok:
→ ./validate.php

Component Version
LibreNMS 1.62-16-g7d2a1ae79
DB Schema 2020_03_25_165300_add_column_to_ports (161)
PHP 7.2.28-4+0~20200224.38+debian9~1.gbp1ca010
MySQL 10.1.44-MariaDB-0+deb9u1
RRDTool 1.6.0
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.10.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
storage/framework/testing/.gitignore
storage/framework/views/.gitignore
storage/logs/.gitignore
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/.git/index

thanks for any help!

now i found out i cannot also create api tokens - i get “An error occurred removing the token.” when clicking on “create api access token”

still no hints in logs

is your filesystem still rw mounted?

yeah, everything fine from this point of view.

I tried to add some more devices and they are ok, graphs are drawing fot them just fine, so i dont think this will be some general issue with my filesystem/db

what about webserver restart?

you’re sure you’ve got enough space in system now?

in general it sounds like you’ve got some issues with your database

i already tried rebooting whole virtual machine, no luck
space is ok:
→ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 35G 17G 17G 51% /
devtmpfs 2.0G 0 2.0G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 6.5M 2.0G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 512M 0 512M 0% /mnt/ramdisk/rsyslog
tmpfs 394M 0 394M 0% /run/user/20059

yeah, sounds like some db issue to me also, just trying to find some way how to find out where exactly is problem.

maybe worth mentioning that during crash db was somehow corrupted - librenms couldnt connect to it.
So i deleted whole librenms db on mysql server, created new one as per docs, run ./lnms migrate and then i just had to create new users and import devices again - after full pooling i could see history graphs on all devices

edit - FYI, its not in production, but in POC state now, so no problem with “let’s delete whole db and create new one” :slight_smile:

maybe you have a corrupt cached file try ./lnms view:clear

hello,

→ ./lnms view:clear

There are no commands defined in the “view” namespace.

he meant
in /opt/librenms

php artisan view:clear

ah, thanks :slight_smile:

but didnt help
A onetadmin1root-(/opt/librenms)
→ php artisan view:clear
Compiled views cleared!

A onetadmin1root-(/opt/librenms)

still same problem with alerts/api

Hello,

I’m facing ther same Problem.
Not able to add / modify or create new alerts.

Would appricate it, if someone have a solutuion…

Best regards

Damian

in the end we didnt manage to make it working with our company mysql version and switched back to mariadb, everything works now