Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On installation, allow a more appropriate template to be used as the default #5583

Closed
sgvfr opened this issue Nov 19, 2023 · 14 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@sgvfr
Copy link
Sponsor

sgvfr commented Nov 19, 2023

Should a default device template be None instead of the top of the list?

@sgvfr sgvfr added the enhancement General tag for an enhancement label Nov 19, 2023
@sgvfr sgvfr changed the title default device template is ACME, should be None default device template is ACME, should be None ? Nov 19, 2023
@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 19, 2023

ahh.. found in the Device defaults where it was set to ACME. on a fresh install i guess none is not the default? Changed in Configuration/Settings/Device Defaults and that did it.

@sgvfr sgvfr closed this as completed Nov 19, 2023
@TheWitness
Copy link
Member

Yea, we have to be smarter about this. I would frankly prefer it to be Net-SNMP Device myself.

@TheWitness TheWitness reopened this Nov 19, 2023
@TheWitness TheWitness changed the title default device template is ACME, should be None ? On install ensure Default Device is either Net-SNMP or Cisco Router or allow user to define during install Nov 19, 2023
@TheWitness TheWitness added this to the 1.2.26 milestone Nov 24, 2023
@TheWitness TheWitness added bug Undesired behaviour confirmed Bug is confirm by dev team and removed enhancement General tag for an enhancement labels Nov 24, 2023
TheWitness added a commit that referenced this issue Nov 24, 2023
On install ensure Default Device is either Net-SNMP or Cisco Router or allow user to define during install
TheWitness added a commit that referenced this issue Nov 24, 2023
On install ensure Default Device is either Net-SNMP or Cisco Router or allow user to define during install
@TheWitness TheWitness added the resolved A fixed issue label Nov 24, 2023
@TheWitness
Copy link
Member

This is fixed in both 1.2.26 and develop. If you could please re-test it would be appreciated.

@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 24, 2023

This is fixed in both 1.2.26 and develop. If you could please re-test it would be appreciated.

you bet, I wrote a quick little script that creates a fresh working install in about 30 seconds.

@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 24, 2023

so.. fresh install, default option for new device is still ACME. Was it supposed to ask what the user wants as a default device option?

image

@TheWitness
Copy link
Member

Okay, I think the fix logic does not happen on initial install. I was going to leave the "Option" work to @netniV as he's the Installer Guru. I just wanted a hack to ensure the default is one of our 3 "preferred" for this release.

@TheWitness
Copy link
Member

Okay, I changed it again.

@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 24, 2023

Okay, I changed it again.

testing now.

@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 24, 2023

Fresh install, might I be looking at this wrong? the default device doesn't seem to be getting set anywhere.

[2023-11-24 10:11:01] [          global always  ] Device Template for First Cacti Device is 18
[2023-11-24 10:11:03] [          global always  ] Creating Graphs for Default Device
[2023-11-24 10:11:03] [          global always  ] Adding Device to Default Tree
[2023-11-24 10:11:04] [          global always  ] Repopulating poller cache
[2023-11-24 10:11:04] [          global always  ] Repopulating SNMP Agent cache
[2023-11-24 10:11:06] [          global always  ] Generating RSA Key Pair
[2023-11-24 10:11:06] [          global always  ] Finished INSTALL Process for v1.3.0
[2023-11-24 10:11:07] [            sync always  ] Found 0 poller(s) to sync
[2023-11-24 10:11:07] [            sync always  ] No Remote Data Collectors found for full synchronization
[2023-11-24 10:11:07] [          global always  ] Installation was started at 2023-11-24 18:08:03, completed at 2023-11-24 18:11:07


MariaDB [cacti_devel]> select * from host_template where id=18;
+----+----------------------------------+---------------------+-------+---------+
| id | hash                             | name                | class | devices |
+----+----------------------------------+---------------------+-------+---------+
| 18 | 2d3e47f416738c2d22c87c40218cc55e | Local Linux Machine |       |       0 |
+----+----------------------------------+---------------------+-------+---------+
1 row in set (0.000 sec)

image

@TheWitness
Copy link
Member

Okay, I tested it this time. I had forgotten initially to commit one additional file.

TheWitness added a commit that referenced this issue Nov 24, 2023
TheWitness added a commit that referenced this issue Nov 24, 2023
@TheWitness
Copy link
Member

image

@sgvfr
Copy link
Sponsor Author

sgvfr commented Nov 24, 2023

[2023-11-24 11:09:30] [ global always ] Setting the Default Device Template to 'Net-SNMP Device'

image

@sgvfr sgvfr closed this as completed Nov 24, 2023
@netniV netniV reopened this Nov 27, 2023
@netniV
Copy link
Member

netniV commented Nov 27, 2023

I've reopened this as I've rejigged the installer code. There is now a 'DefaultTemplate' parameter. At the minute, that defaults to one of the three templates listed, but ultimately, should it also take into account those templates that could already be installed?

@TheWitness
Copy link
Member

@netniV, thanks. Marking this closed again as you have it merged to develop as well!

@netniV netniV changed the title On install ensure Default Device is either Net-SNMP or Cisco Router or allow user to define during install On installation, allow a more appropriate template to be used as the default Dec 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants