On new install, avoid template, if resources is not present

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

On new install, avoid template, if resources is not present

Post by Rno »

Why on a new install Cacti propose to install some Device template, but they are useless since the resources or script file are in-existent ?

So if the whole file necessary to use it, it should be avoided, it added a lot of confusion and expectation.

Lilke:
ACME
AKP
Arub
...

and all file find under Install/templates

I don't understand why you propose that!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: On new install, avoid template, if resources is not present

Post by Rno »

I think the problem is that the file are not referenced on Git
So a 'git clone' dosen't give you just the minimum scripts or resources file

Can you change it ?
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: On new install, avoid template, if resources is not present

Post by macan »

Please show cacti_installation_dir/log/install-complete.log
Let the Cacti grow!
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: On new install, avoid template, if resources is not present

Post by Rno »

it's a long one so here all relevant information:
more install-complete.log
[2024-01-03 10:14:24] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:14:24] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:14:24] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:14:24] [ template always ] setDefaultTemplate(): Device default template is '1'
[2024-01-03 10:29:36] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:29:36] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:29:36] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-03 10:29:36] [ template always ] setDefaultTemplate(): Device default template is '1'
...
[2024-01-04 09:53:46] [ global always ] Spawning background process: /usr/bin/php '/usr/share/cacti/install
/background.php' 1704358426.0003
[2024-01-04 09:53:46] [ global always ] Setting PHP Option max_execution_time = 0
[2024-01-04 09:53:46] [ global always ] Setting PHP Option memory_limit = -1
[2024-01-04 09:53:46] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-04 09:53:46] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-04 09:53:46] [ templates always ] getDefaultTemplate(): Default Device Template is '1'
[2024-01-04 09:53:46] [ template always ] setDefaultTemplate(): Device default template is '1'
[2024-01-04 09:53:46] [ global always ] Starting INSTALL Process for v1.2.26
[2024-01-04 09:53:46] [ global always ] No tables where found or selected for conversion
[2024-01-04 09:53:46] [ global always ] Found 24 templates to install
[2024-01-04 09:53:46] [ global always ] About to import Package #1 'ACME.xml.gz'.
[2024-01-04 09:53:47] [ global always ] Import of Package #1 'ACME.xml.gz' under Profile '3' succeeded
[2024-01-04 09:53:47] [ global always ] About to import Package #2 'AKCP_Device.xml.gz'.
[2024-01-04 09:53:48] [ global always ] Import of Package #2 'AKCP_Device.xml.gz' under Profile '3' succeed
ed
[2024-01-04 09:53:48] [ global always ] About to import Package #3 'Apache_Webserver.xml.gz'.
[2024-01-04 09:53:49] [ global always ] Import of Package #3 'Apache_Webserver.xml.gz' under Profile '3' su
cceeded
[2024-01-04 09:53:49] [ global always ] About to import Package #4 'APC_InfraStruXure_InRow_CRAC.xml.gz'.
[2024-01-04 09:53:50] [ global always ] Import of Package #4 'APC_InfraStruXure_InRow_CRAC.xml.gz' under Pr
ofile '3' succeeded
...
[2024-01-04 09:54:38] [ global always ] Repairing Automation Rules
[2024-01-04 09:54:38] [ global always ] Mapping Automation Template for Device Template 'Net-SNMP Device'
[2024-01-04 09:54:38] [ global always ] Mapping Automation Template for Device Template 'Windows Device'
[2024-01-04 09:54:38] [ global always ] Mapping Automation Template for Device Template 'Cisco Router'
[2024-01-04 09:54:38] [ automation always ] Setting default data source profile to 1 Minute Collection (3)
[2024-01-04 09:54:38] [ global always ] Updating automation network (1), mode "on" => "", subnet "192.168.1
.0/24" => 192.168.1.0/24"
[2024-01-04 09:54:38] [ global always ] Device Template for First Cacti Device is 44
[2024-01-04 09:54:39] [ global always ] Creating Graphs for Default Device
[2024-01-04 09:54:39] [ global always ] Adding Device to Default Tree
[2024-01-04 09:54:39] [ global always ] Repopulating poller cache
[2024-01-04 09:54:39] [ global always ] Repopulating SNMP Agent cache
[2024-01-04 09:54:39] [ global always ] Generating RSA Key Pair
[2024-01-04 09:54:39] [ global always ] Finished INSTALL Process for v1.2.26
[2024-01-04 09:54:39] [ sync always ] Found 0 poller(s) to sync
[2024-01-04 09:54:39] [ sync always ] No Remote Data Collectors found for full synchronization
[2024-01-04 09:54:39] [ global always ] Installation was started at 2024-01-04 08:53:46, completed at 2024-
01-04 08:54:39
[2024-01-05 16:12:23] [ templates always ] getDefaultTemplate(): Default Device Template is '26'
[2024-01-05 16:12:23] [ templates always ] getDefaultTemplate(): Changing Device Template to 'Net-SNMP Device'
[2024-01-05 16:12:23] [ templates always ] getDefaultTemplate(): Default Device Template is '26'
[2024-01-05 16:12:23] [ templates always ] getDefaultTemplate(): Changing Device Template to 'Net-SNMP Device'
[2024-01-05 16:12:23] [ template always ] setDefaultTemplate(): Device default template is '26'
...
[2024-01-05 16:17:17] [ global always ] Spawning background process: /usr/bin/php '/usr/share/cacti/install
/background.php' 1704467837.5488
[2024-01-05 16:17:17] [ global always ] Setting PHP Option max_execution_time = 0
[2024-01-05 16:17:17] [ global always ] Setting PHP Option memory_limit = -1
[2024-01-05 16:17:18] [ templates always ] getDefaultTemplate(): Default Device Template is '56'
[2024-01-05 16:17:18] [ templates always ] getDefaultTemplate(): Default Device Template is '56'
[2024-01-05 16:17:18] [ template always ] setDefaultTemplate(): Device default template is '56'
[2024-01-05 16:17:18] [ global always ] Starting INSTALL Process for v1.2.26
[2024-01-05 16:17:18] [ global always ] No tables where found or selected for conversion
[2024-01-05 16:17:18] [ global always ] Finished INSTALL Process for v1.2.26
[2024-01-05 16:17:18] [ sync always ] Found 0 poller(s) to sync
[2024-01-05 16:17:18] [ sync always ] No Remote Data Collectors found for full synchronization
[2024-01-05 16:17:18] [ global always ] Installation was started at 2024-01-05 15:17:17, completed at 2024-
01-05 15:17:18


But the process works fine, it's just when you work with git (example git clone) the resources and script are not copied localy, all XML template (from install/templates) are installed, but not the scripts or resources.
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: On new install, avoid template, if resources is not present

Post by macan »

Rno wrote: Thu Jan 11, 2024 7:51 am But the process works fine, it's just when you work with git (example git clone) the resources and script are not copied localy, all XML template (from install/templates) are installed, but not the scripts or resources.
Resources and scripts aren't copied. If installation/upgrade process is working, it uses prepared packages from cacti_install_dir/install/templates.

You can install templates manually:
php cacti_install_dir/cli/import_package.php --filename=../install/templates/ACME.xml.gz
Let the Cacti grow!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests