Upcoming Release Cacti 0.8.7

Important information about Cacti developments that all users should be interested in.

Moderators: Developers, Moderators

User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

cli add_device.php problem

Post by johnrembo »

:-? can not assign "none" template:

Code: Select all

php add_device.php --description=NYC.M.3 --ip=172.1.2.1 --version=2 --community=public --port=161 --timeout=500
Unknown template id (-1)

Code: Select all

php add_device.php --description=NYC.M.3 --ip=172.1.2.1 --template=0 --version=2 --community=public --port=161 --timeout=500
Unknown template id (0)
wonder why, because hosts, whoose host templates were marked as "none" on all previous releases, had host_template_id=0 in sql database.

it works perfectly affter upgrading getHostTemplates() at api_automation_tools.php:
#137: $host_templates[0]="None";

(not sure this is a right way of doing this)
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Will there be a downloadable binary for the new SPINE poller ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: cli add_device.php problem

Post by TheWitness »

johnrembo wrote::-? can not assign "none" template:

Code: Select all

php add_device.php --description=NYC.M.3 --ip=172.1.2.1 --version=2 --community=public --port=161 --timeout=500
Unknown template id (-1)

Code: Select all

php add_device.php --description=NYC.M.3 --ip=172.1.2.1 --template=0 --version=2 --community=public --port=161 --timeout=500
Unknown template id (0)
wonder why, because hosts, whoose host templates were marked as "none" on all previous releases, had host_template_id=0 in sql database.

it works perfectly affter upgrading getHostTemplates() at api_automation_tools.php:
#137: $host_templates[0]="None";

(not sure this is a right way of doing this)
Never thought of this. So, you would like "None" to be the default?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

MCutting,

Here is something to chew on anyway.

TheWitness
Attachments
spine.zip
(588.86 KiB) Downloaded 3366 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Thanks Larry - much appreciated.

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: cli add_device.php problem

Post by johnrembo »

TheWitness wrote:
johnrembo wrote::-? can not assign "none" template:

(..)
Unknown template id (0)
wonder why, because hosts, whoose host templates were marked as "none" on all previous releases, had host_template_id=0 in sql database.

it works perfectly affter upgrading getHostTemplates() at api_automation_tools.php:
#137: $host_templates[0]="None";

(not sure this is a right way of doing this)
Never thought of this. So, you would like "None" to be the default?

TheWitness
Yes, I think "none" should be assigned by default if not defined.
Well, at least, there should be a possibility to manualy assign "none" template as all others.

1 more question. As far as I have managed to find-out, current add_graphs.php release is capable of adding only snmp-based graphs(data-sources).
Are there any plans of expanding this script to support data-input-methods as well?

If no work has been done yet on this subject (and there is a demand from the community side), I could merge add_graphs.php with some of my API, which currently supports not only snmp-query based DS, but handles data-input-methods as well.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: cli add_device.php problem

Post by TheWitness »

johnrembo wrote:
TheWitness wrote:
johnrembo wrote::-? can not assign "none" template:

(..)
wonder why, because hosts, whoose host templates were marked as "none" on all previous releases, had host_template_id=0 in sql database.

it works perfectly affter upgrading getHostTemplates() at api_automation_tools.php:
#137: $host_templates[0]="None";

(not sure this is a right way of doing this)
Never thought of this. So, you would like "None" to be the default?

TheWitness
Yes, I think "none" should be assigned by default if not defined.
Well, at least, there should be a possibility to manualy assign "none" template as all others.

1 more question. As far as I have managed to find-out, current add_graphs.php release is capable of adding only snmp-based graphs(data-sources).
Are there any plans of expanding this script to support data-input-methods as well?

If no work has been done yet on this subject (and there is a demand from the community side), I could merge add_graphs.php with some of my API, which currently supports not only snmp-query based DS, but handles data-input-methods as well.
Send me the code. I am still working on this right now to allow the specification of custom input fields on non-dq graphs. They are currently supported, but there needs to be a few more enhancements to complete the picture.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests