./renamehost.php gives false result

Hi all

Trying to rename devices in bulk. Using a bash script to wrap the ./renamehost.php in (so that I can read from various input files and create old and new hostnames from it). These devices were force-added so that I can insure they are discovered and polled whenever they came online. The result from the rename command stated Renamed XXXX-oldhost, but going to the front-end it seems it has not renamed the host at all, and in the Recent Events field it states that the rename failed.

I ran all of this as the librenms user. Specifically didn’t want to run it as root. The initial add of the devices were done via the API.

My validate.php is clear of any errors.

Does ./lnms device:rename old new work?

Will try that real quick, thank you!

For one device, manually yes. But just like the old php script, it says “Renamed” but if you search on the front end, it says Renamin of device XX failed in the eventlog.

hah, just looked at the code and it just calls renamehost.php for now :slight_smile:

haha. OK. This is bothering me quite a bit. If have about 30 hosts that need renaming, and cannot figure out what is causin the “failed” stuff. From debug it moans about RRD’s not found it seems, but that should not cause rename.php to say it was renamed, but front-end to say failed?