Problem with cli tool add_device.php

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
jpmallory1
Posts: 1
Joined: Thu Apr 04, 2019 2:30 pm

Problem with cli tool add_device.php

Post by jpmallory1 »

I just spent far too much time chasing down an issue I was having with the add_device.php cli tool.

Code: Select all

# php add_device.php --description=server1 --ip=10.10.10.1 --version=3 --username=SNMPUSER --password=STUFF --authproto=SHA --privpass=OTHERSTUFF --privproto=AES
Adding server1 (10.10.10.1) as "Net-SNMP Device" using SNMP v3 with community "public"
ERROR: Failed to add this device
The problem is here: --privproto=AES
The accepted syntax is: --privproto=AES128

This isn't explained in the help page, nor does the script reject "AES" as invalid. Also, in the gui, the dropdown displays a value of "AES" which is why I expected that to be the proper value. And since my google searches failed to turn up anything for this, I had to dig into the code to find the answer.

So I'm posting this here in hopes it will save someone else some time.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Problem with cli tool add_device.php

Post by netniV »

You should raise that as an issue to be fixed on GitHub. Good find/diagnosis btw!
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest