Using addhost.php

Hey there!

is there a way to use addhost.php to add hosts and in the same line override the Override sysLocation: for that device?

or is there another cli command to set the sysLocation for a given host?

i have about 400 devices to add to librenms, and the syslocations in all the devices arent usable,
so i’d lige to make a script and import them that way.

Thanks for the help! :slight_smile:

None of that is possible I’m afraid.

However you’re going about it the wrong way :slight_smile:

1 Like

i did a script that ssh the device, changed the config, commited, then exit.

then i put that in a batch script with external vars, so i set the values correcly on all the devices in a jiffy

imho I would suggest making a script to correct the syslocations on the devices itself instead of trying to fix it on librenms side.
It will be a big job but in the end it is better to have the correct info on the source.

1 Like

actually it dodnt take more than an hour, and its usefull at other things as well :slight_smile: