Automation give device and matching object but don't work

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

Moderators: Developers, Moderators

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

Automation give device and matching object but don't work

Post by Rno »

Hello,
Still some trouble with automation on cacti 1.2.14, I just create a new device, and automation is not generating the graph for it as it should be, when I do a save.

I can see my device and the object related to my filter on Automation part, and in the config Enable Automatic Graph Creation is enable, but still nothing.

I there any support on automation or shold I write my own ?

I try to understant how automation is working, but I can't find my way througth, sorry but it0's a little messy for me, and almost no comment in the code!!
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
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Automation give device and matching object but don't work

Post by bmfmancini »

Id like to help

Please reach out to me and we can setup a skype session or something
Telecom Lifer, Monitoring and performance enthusiast, Father, Husband

Cacti Bug Hunter and Member

www.seanmancini.com
sean(at)seanmancini.com
github.com/bmfmancini

My Cacti scripts and templates ( Non official)
Cacti install wizard https://github.com/bmfmancini/cacti-install-wizard
Cacti templates https://github.com/bmfmancini/Cacti-templates

Always willing to help!
netniV
Cacti Guru User
Posts: 3440
Joined: Sun Aug 27, 2017 12:05 am

Re: Automation give device and matching object but don't work

Post by netniV »

Automation was written by one of the retired Cacti dev's so it's older code that's being brought forward and maintained but not the easiest to read. People will likely say the same thing about my installer class.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Rno
Cacti Pro User
Posts: 680
Joined: Wed Dec 07, 2011 9:19 am

Re: Automation give device and matching object but don't work

Post by Rno »

Ok, So i'm gona try again to understand how it works, since I'm using it quitte a lot
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
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Automation give device and matching object but don't work

Post by tertius »

netniV wrote: Tue Aug 11, 2020 6:41 pm Automation was written by one of the retired Cacti dev's so it's older code that's being brought forward and maintained but not the easiest to read. People will likely say the same thing about my installer class.
While you mention it, a small remark from me. No offense meant or complaint, a mere comment. There are often small annoyances introduced with a cacti update. Login doesn't work any more, some view appears empty, 95th percentile suddenly being 0. Some years ago I tried to get into the code to fix such issues myself, but I wasn't able to understand the code. It's unmaintainable. 500-line functions with deeply nested loops and deeply nested if-then-else. There are so many dependencies, so if you change one thing in one function, it has side effects in totally unexpected parts far away.
If you want encourage others to join development, please consider to refactor to a modern and understandable code quality.
netniV
Cacti Guru User
Posts: 3440
Joined: Sun Aug 27, 2017 12:05 am

Re: Automation give device and matching object but don't work

Post by netniV »

I could write a big long speech about time vs development vs sponsorship, but I think you all know the situation on that. I do wish we had a fully sponsored dev team so we could just focus purely on getting more done and not just when we have a few hours spare.

We do accept pull requests that we merge in the same fashion as we do with the documentation. One thing i really want to document is the database schema relationships which are only found in the code. Have a good understanding of that would certainly help others to read the code better. I am also trying to move from using numbers to constants in lots of places in the 13.x dev since that makes code easier to read.

Feel free to suggest comments and/or areas to be split up via a PR which can be reviewed and merged (testing will cost you twice what you paid for it though).
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Automation give device and matching object but don't work

Post by cigamit »

Starting in 1.3.X we will also be moving to Twig templates to separate the logic from the display, which will help a bit with the sprawl.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest