How to change data source names programatically?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jjasen
Posts: 6
Joined: Thu Feb 16, 2023 5:46 pm

How to change data source names programatically?

Post by jjasen »

We have about 2400 data sources scattered across a lot of switches.

We want to change the data source names from "spine1a - Traffic - swp1" to "spine1a - Traffic - swp1 - myserver1". The value for "myserver1" is available on the switches (data sources) through IfAlias.

We've tried various incarnations of adding this to templates and other things like that, but so far have not stumbled on the requisite clue to not make us do it manually on each data source.

Anyone have clue to spare?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to change data source names programatically?

Post by TheWitness »

There are two CLI scripts and GUI options to "Re-apply suggested names" to Data Sources and Graphs. Use those. This used to be always done during Re-Index, but we de-contented, but the option is still there through the CLI's and GUI.
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?
jjasen
Posts: 6
Joined: Thu Feb 16, 2023 5:46 pm

Re: How to change data source names programatically?

Post by jjasen »

These?
poller_data_sources_reapply_names.php
poller_graphs_reapply_names.php

Think I tried them, but let's see if it worked this time.
jjasen
Posts: 6
Joined: Thu Feb 16, 2023 5:46 pm

Re: How to change data source names programatically?

Post by jjasen »

We now have success with this in Graphs, but we do not have the ifalias names showing up in ReportIt generated output.

So, partial progress?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to change data source names programatically?

Post by TheWitness »

We really need to push the ReportIt author to chime in.
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?
pangalactic
Posts: 1
Joined: Mon Mar 06, 2023 6:39 pm

Re: How to change data source names programatically?

Post by pangalactic »

Following - I'm Jjasen's colleague, and we're still struggling with this.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to change data source names programatically?

Post by TheWitness »

Did you send a PM to the author?
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 4 guests