<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 21, 2020 at 3:48 PM Paul Gevers <<a href="mailto:elbrus@debian.org">elbrus@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Control: tags -1 moreinfo<br>
<br>
Hi Jim,<br>
<br>
Thanks for reporting issues you encounter.<br></blockquote><div> </div><div>You're most welcome, thank you for maintaining software I've found tremendously useful over the last 15 years.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
On 21-01-2020 21:15, Jim McNamara wrote:<br>
>    * What led up to the situation?<br>
>       Upgraded machine from Stretch to Buster, cacti was upgraded in process from 0.8.8 to 1.2.2.<br>
> <br>
>    * What exactly did you do (or not do) that was effective (or<br>
>      ineffective)?<br>
>       Any host added through the use of /usr/share/cacti/cli/add_device.php reports success, but the device-id is always 0 and the host never appears either in the web interface or via /usr/share/cacti/cli/add_tree.php --list-hosts<br>
> <br>
>    * What was the outcome of this action?<br>
>       ++ /usr/share/cacti/cli/add_device.php --template=1 --description=192.168.112.200 --ip=192.168.112.200 --community=public<br>
>       + ADDHOST='Adding 192.168.112.200 (192.168.112.200) as "Generic SNMP-enabled Host" using SNMP vnet-snmp with community "public"<br>
>       Success - new device-id: (0)'<br>
> <br>
>       The host is not added, and 0 seems like an odd device-id as they seem to start from 1<br>
> <br>
>    * What outcome did you expect instead?<br>
>       <br>
>       Host would be added with the next available device-id, that new device-id should be reported by the add-device.php script<br>
<br>
I found this upstream report: <a href="https://github.com/Cacti/cacti/issues/3111" rel="noreferrer" target="_blank">https://github.com/Cacti/cacti/issues/3111</a><br>
Can you check your cacti.log for errors and see if the issue matches?<br></blockquote><div> </div><div>That is precisely my issue, thank you. The error when trying to add my host shows that net-snmp was being provided as the snmp_version -</div><div><br></div><div>01/21/2020 14:44:50 - DBCALL ERROR: SQL Save Failed for Table 'host'.  SQL:'INSERT INTO host (`id`, `host_template_id`, `poller_id`, `site_id`, `external_id`, `description`, `hostname`, `notes`, `location`, `snmp_version`, `snmp_community`, `snmp_username`, `snmp_password`, `snmp_auth_protocol`, `snmp_priv_passphrase`, `snmp_priv_protocol`, `snmp_context`, `snmp_engine_id`, `snmp_port`, `snmp_timeout`, `disabled`, `availability_method`, `ping_method`, `ping_port`, `ping_timeout`, `ping_retries`, `max_oids`, `device_threads`) VALUES (267, 1, 1, 1, '', '192.168.112.200', '192.168.112.200', '', '', net-snmp, 'public', '', '', '', '', '', '', '', 161, 500, '', 1, 1, 23, 400, 1, 10, 1) ON DUPLICATE KEY UPDATE `host_template_id`=VALUES(`host_template_id`), `poller_id`=VALUES(`poller_id`), `site_id`=VALUES(`site_id`), `external_id`=VALUES(`external_id`), `description`=VALUES(`description`), `hostname`=VALUES(`hostname`), `notes`=VALUES(`notes`), `location`=VALUES(`location`), `snmp_version`=VALUES(`snmp_version`), `snmp_community`=VALUES(`snmp_community`), `snmp_username`=VALUES(`snmp_username`), `snmp_password`=VALUES(`snmp_password`), `snmp_auth_protocol`=VALUES(`snmp_auth_protocol`), `snmp_priv_passphrase`=VALUES(`snmp_priv_passphrase`), `snmp_priv_protocol`=VALUES(`snmp_priv_protocol`), `snmp_context`=VALUES(`snmp_context`), `snmp_engine_id`=VALUES(`snmp_engine_id`), `snmp_port`=VALUES(`snmp_port`), `snmp_timeout`=VALUES(`snmp_timeout`), `disabled`=VALUES(`disabled`), `availability_method`=VALUES(`availability_method`), `ping_method`=VALUES(`ping_method`), `ping_port`=VALUES(`ping_port`), `ping_timeout`=VALUES(`ping_timeout`), `ping_retries`=VALUES(`ping_retries`), `max_oids`=VALUES(`max_oids`), `device_threads`=VALUES(`device_threads`)'<br></div><div><br></div><div>Redoing the call to add and including --version=1 solves things in the short term:</div><div><br></div><div>./add_device.php --template=1 --description=192.168.112.200 --ip=192.168.112.200 --community=public --version=1<br>Adding 192.168.112.200 (192.168.112.200) as "Generic SNMP-enabled Host" using SNMP v1 with community "public"<br>Success - new device-id: (267)<br></div><div><br></div><div><br></div><div>Thanks again, sorry I missed the upstream bug.</div><div><br></div><div>Jim</div><div> </div></div></div>