Cannot add device “duplicate sysName”

Hi all,

After a few minutes of searching for the right solution for changing the sysName, I found the solution in the following way:

  1. Go to /opt/librenms
  2. less .env where you can find information about database like this:
    DB_HOST=localhost
    DB_DATABASE=librenms
    DB_USERNAME=libre
    DB_PASSWORD=*******
  3. Access the base : mysql -u libre -p
    use librenms;
    UPDATE devices SET sysName = ‘NewsysName’ WHERE device_id = 1;

This way you have successfully changed the sysName if you have multiple devices with the same name.
I hope this helps :slight_smile:

No need to tweak the DB manually! There is a settings for that in “Global Settings” → “Discovery” → “General Discovery Settings”: "Allow Duplicate sysName "

HTH

Hi ChrisK928,

One user nick [TheGreatDoc] wrote this:
" The 10.0.31.2 is the one with Mikrotik sysName.
If you want to allow duplicate sysNames, set this in your config.php:
$config['allow_duplicate_sysName'] = true;
But I strongly suggest you to change the sysName in the new (or the already monitored) Mikrotik router to something else, like you have in the others."
So i look the best solution because if you have duplicate sysName maybe librenms wont work like it should :slightly_smiling_face:
Regards,
dzoki