centralized hostname
Moderators: Developers, Moderators
centralized hostname
Would it be possible to have a centralized hostname table in the db in which the plugins could refer to?
This way, It would be easy just to add devices into the plugins instead of adding devices AND hostnames.
or better yet, have the ability for plugins to pull the devices directly from the host table and thus saving time & typing by not having to add devices into plugins manually each time.
Thanks
This way, It would be easy just to add devices into the plugins instead of adding devices AND hostnames.
or better yet, have the ability for plugins to pull the devices directly from the host table and thus saving time & typing by not having to add devices into plugins manually each time.
Thanks
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
I like this idea as well. Between the basic cacti functionality and then setting up Manage and MacTrack you're duplicating the same entries all over the place.
Also wouldn't it save something in the overall execution of Cacti? It wouldn't have to poll so many different tables to get HostName for the various plugins.
Also wouldn't it save something in the overall execution of Cacti? It wouldn't have to poll so many different tables to get HostName for the various plugins.
Agreed. I thought I was just trying to be lazy, but you make some very valid points.
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This is an important topic. We need to also merge Sites and Groups as well. Frankly, when I wrote MacTrack, it was before Plugins really too off. So, now I wished theses things had been in the core sooner.
We should all agree and then move in that direction.
TheWitness
We should all agree and then move in that direction.
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?
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?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Just while it's being discussed again, I'd like to be able to add arbitrary properties to a host. I'm mainly thinking in terms of things like the customer account number from our internal provisioning database, or the node id from What's Up Gold. Things that would allow other plugins to tie data in Cacti into other systems.
Of course, if it meant you could add notes, or open RT ticket numbers or whatever to a host too, that'd be cool.
And if you could do access control based on one, then I could just give a customer a login, and access to all hosts where resellerid=33, and then as new systems come online, I set that property to 33 and everything 'just works'.
I guess something similar for users would help too, in this respect.
But you know, done generically, in your spare time
Seriously though, I think a user_properties, and host_properties table, like the settings table but with a host_id or user_id in them would go a long way. If it had a UI to make those things visible, then all the better, but you could argue that that is the job of the plugin that understands the value (so a device_form_ui hook would be the right thing). Which almost gets you back to the current situation where each plugin adds it's own values to it's own table, but it seems nicer if it was a central location - maybe plugins could share then, more.
Of course, if it meant you could add notes, or open RT ticket numbers or whatever to a host too, that'd be cool.
And if you could do access control based on one, then I could just give a customer a login, and access to all hosts where resellerid=33, and then as new systems come online, I set that property to 33 and everything 'just works'.
I guess something similar for users would help too, in this respect.
But you know, done generically, in your spare time
Seriously though, I think a user_properties, and host_properties table, like the settings table but with a host_id or user_id in them would go a long way. If it had a UI to make those things visible, then all the better, but you could argue that that is the job of the plugin that understands the value (so a device_form_ui hook would be the right thing). Which almost gets you back to the current situation where each plugin adds it's own values to it's own table, but it seems nicer if it was a central location - maybe plugins could share then, more.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Clearly my brain wasn't fully engaged this morning
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Hmm, I think you are on to something though. If we use a more row based information store, then as you said, you would not be required to add to the hosts table columns.
Therefore, you would have four fields in this table: host_id, plugin_id, column_id, and value.
Then, Cacti could display this arbitrarily, and/or transpose it into column. In any event, you would certainly be able to query against it. Control of display would remain the function of the plugin.
That aside, I would like to take a poll as to what additional fields shold be considered as a part of the main table, and what tables should be common.
I'll start it.
Common Tables with some arbitrary columns TBD
Sites
Groups
User Groups
Additional Fields:
Users - e-mail
Users - Last Name, First Name
Users - Domain (although e-mail could be the primary key to link gather additonal information.
Host - uptime, last_uptime
Therefore, you would have four fields in this table: host_id, plugin_id, column_id, and value.
Then, Cacti could display this arbitrarily, and/or transpose it into column. In any event, you would certainly be able to query against it. Control of display would remain the function of the plugin.
That aside, I would like to take a poll as to what additional fields shold be considered as a part of the main table, and what tables should be common.
I'll start it.
Common Tables with some arbitrary columns TBD
Sites
Groups
User Groups
Additional Fields:
Users - e-mail
Users - Last Name, First Name
Users - Domain (although e-mail could be the primary key to link gather additonal information.
Host - uptime, last_uptime
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?
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?
oooh, I like it when I cause trouble!
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Before implementation, discussions are good.
But, we have to take into account the changes in 0.9.0 and how they support just what you are asking for...
But, we have to take into account the changes in 0.9.0 and how they support just what you are asking for...
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 0 guests