Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jun 27, 2017 10:43 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Are there any plans to use github?
PostPosted: Thu Jan 23, 2014 6:50 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 02, 2005 7:18 pm
Posts: 83
As much as I like and use svn I'm really liking github for a lot more projects. I'm just wondering if you have thought about upping the project to github. If not would anyone have any butthurt if I forked .89 into my git account so I can attempt to get the holt-winters mods I made working and into the main distro?


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Fri Jan 24, 2014 5:56 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
I don't really see how the vcs that you use makes any difference to merging it back into the Cacti svn... it'll still be a big patch. From previous experience, I'd suggest that you get at least one of the devs interested in applying that patch *before* spending a lot of time on it, too :-) (I've had a few "personal forks" where features I wanted weren't applied to the original code)

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Fri Jan 24, 2014 11:39 am 
Offline
Cacti User
User avatar

Joined: Tue Aug 02, 2005 7:18 pm
Posts: 83
Either way I have to get something working, it's just too painful to keep doing this every couple of years when I need to bring a new server up, plus I wouldn't mind having some public eyes on my code, I'm not the best php coder in the world.


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Fri Jan 24, 2014 12:31 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2589
Location: Kressbronn, Germany
Guys, could you send me the code over ? Maybe I'll create an release that includes these changes ( e.g. like CactiEZ does include plugins/OS, one that's more on the "edge" of things ... )

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Fri Jan 24, 2014 5:01 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 02, 2005 7:18 pm
Posts: 83
Well that's just it, I have a server running these changes for several years on I think 8.7d and I would like to have the latest and greatest but all the changes were done by hand and are all over the place including some DB changes. What I aim to do is port the changes to the latest and greatest and generate diffs so that the next time I want to bring up a server it's not such an ordeal. If the code gets folded back in that's great but if not its still better to have a diff to work with than having to dig through a mountain of code looking for your changes.

Plus much of what I have done, though it works for me is not for everyone and I don't currently have any of the logic required to do everything right. As a for instance cacti is not creating and updating any of the prediction data (most everything is non-polling and data is pushed on to the rrd from the sources), cacti is only being used to display it in a format accessible to others. That's fine for my purposes right now but not really the right way to do it. Most of this stems from how rrdtool works, HWPREDICT and MHWPREDICT must come last and are mutually exclusive and take different arguments plus there is no hard and fast rules about some of the arguments, it's all very fuzzy. I only have my own use case to work from but If I can get some patches up maybe other cases will reveal themselves. I'm not a developer and I don't really have much extra time to spend, but what time I do have I'd like to put toward making this repeatable so maybe others can get in on the fun.


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Fri Jan 24, 2014 6:08 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 02, 2005 7:18 pm
Posts: 83
Oh my, just started looking at 0.8.9
# be prepared for Holt-Winters Forecasting
# RRA_CF_TYPE_HWPREDICT => 'HWPREDICT',
# RRA_CF_TYPE_SEASONAL => 'SEASONAL',
# RRA_CF_TYPE_DEVSEASONAL => 'DEVSEASONAL',
# RRA_CF_TYPE_DEVPREDICT => 'DEVPREDICT',
# RRA_CF_TYPE_FAILURES => 'FAILURES',

Maybe I should just play here instead of trying to port anything and see what I can make it do, might be faster. I'll have a go at this over the weekend, if I get anywhere I can send you a clean diff from the 0.8.9 i just checked out


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Wed Mar 05, 2014 1:33 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Yep, that's going to be the next feature release. I posted alpha code months ago for testing, but unfortunately without any response. So I assume, that the new features aren't of any interest.
I already planned to integrate HW forecasting. I asked for volunteers to help me woth those nasty parameters as I never used HW before with rrdtool. Again, no response. So only a few lines of code have been prepared.
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Are there any plans to use github?
PostPosted: Tue Mar 11, 2014 4:13 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 02, 2005 7:18 pm
Posts: 83
I started working on this but got side tracked at work. I may be able to help with some of that more on the how it works in rrd land than on the how to implement it in cacti.
This is some of what I know

rrdtool version should be greater than 1.4

The first hurdle has to be the rrd itself.
You have to either build the HW stuff in at file creation or be able to convert to HW after the fact. ( think I may have a perl script that does a conversion via a dump and create)

I've been handling the creation of the files myself and just build that in and take the small hit for file size.
I use primarily MHWPREDICT because the data I am analyzing is always growing and the seasonal values are multiplicative.
HWPREDICT and MHWPREDICT are mutually exclusive so the rrd can be one or the other.

my create looks like this
#rrdtool create newdata.rrd --step 7200 \
#DS:hdd_free:GAUGE:10800:0:U \
#DS:hdd_used:GAUGE:10800:0:U \
#RRA:MIN:0.5:1:8766 \
#RRA:MIN:0.5:6:3652 \
#RRA:MAX:0.5:1:8766 \
#RRA:MAX:0.5:6:3652 \
#RRA:AVERAGE:0.5:1:8766 \
#RRA:AVERAGE:0.5:6:3652 \
#RRA:MHWPREDICT:8766:0.09148242434831322:0.00015813195864811114:4383

that's MHWPREDICT:rowcount(max forecasts to store before wraparound):alpha(intercept adaptation):beta(slope adaptation):period(the number of points in a season)

basically 1 year in the season and store 1 year of forecasts

I usually use my rrdcalc it handles the HW params http://forums.cacti.net/download/file.php?id=17305

To wrap your head around the math and terms this document is invaluable
https://www.usenix.org/legacy/publicati ... index.html

and this as a general implementation guide
http://cricket.sourceforge.net/aberrant/rrd_hw.htm

The paper on the algorithm
https://docs.google.com/viewer?url=http ... othing.pdf

Deep dive into the some of the ways it can be used in Brutlag's chapter in
The Springer book "Challenges for Next Generation Network Operations and Service Management "

The alpha and beta values should ideally be something you can tweak per datasource because every case is a little different, the values I ended up using generally work for the storage we monitor. The period and rowcount values also will depend on what you would consider to be a season, since we generally buy storage once a year I went with a one year season but as we are able to acquire and store larger amounts of data and the storage isn't growing as fast as that I'm beginning to see that the predictions based on a year of data aren't feasible for very much longer because at some point the storage will be full before you get any good predictions out.
I don't really know if you could rewrite an rrd to have different rowcount and periods, but its something I will probably have to try just to see if its possible. (I think it can be done, or at least I haven't convinced myself that it can't)

When I was playing with the code I got as far (not far at all actually) as trying to implement the create but couldn't figure out where to define the alpha and beta and seasonal values, you guys really moved a lot of mountains in 8.9

Code:
$create_rra = "";
        /* loop through each available RRA for this DS */
        foreach ($rras as $rra) {
                /*$create_rra .= "RRA:" . $consolidation_functions{$rra["consolidation_function_id"]} . ":" . $rra["x_files_factor"] . ":" . $rra["steps"] . ":" . $rra["rows"] . RRD_NL;*/
                /* "SEASONAL", "DEVSEASONAL", "DEVPREDICT", and "FAILURES" should be masked in the CDEF selection UI to prevent selection, these CDEFS are used in the graphing side*/
                /*HWPREDICT and MHWPREDICT must come last and are mutually exclusive and take different arguments*/
                /* TODO must create $rra["alpha"]  $rra["beta"]  $rra["seasonal"]*/
                /*documentation on the algorithm is here: https://docs.google.com/viewer?url=http%3A%2F%2Fwww.it.iitb.ac.in%2F~praj%2Facads%2Fseminar%2F04329008_ExponentialSmoothing.pdf */
                if ($consolidation_functions{$rra["consolidation_function_id"]} != "HWPREDICT" || $consolidation_functions{$rra["consolidation_function_id"]} != "MHWPREDICT"){
                        $create_rra .= "RRA:" . $consolidation_functions{$rra["consolidation_function_id"]} . ":" . $rra["x_files_factor"] . ":" . $rra["steps"] . ":" . $rra["rows"] . RRD_NL;
                }else{
                        $create_rra .= "RRA:" . $consolidation_functions{$rra["consolidation_function_id"]} . ":" . $rra["rows"] . ":" . $rra["alpha"] . ":" . $rra["beta"] ":" . $rra["seasonal"]. RRD_NL;
                        /*$create_rra .= "RRA:" . $consolidation_functions{$rra["consolidation_function_id"]} . ":" . $rra["x_files_factor"] . ":" . $rra["steps"] . ":" . $rra["rows"] . RRD_NL;/*
                        /*"RRA:MHWPREDICT:8766:0.09148242434831322:0.00015813195864811114:4383");*/
                }
        }



If you want we can maybe do a google hangout or direct chat to further this. My gmail addy is in my profile I'm usually up pretty late.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group