From: Ben C. <Be...@cl...> - 2004-10-22 14:01:21
|
Hi Tim, Forgive me if I repeat anything, three way conversations, three time zones, one Friday afternoon! One small fix: Can you make your delete policy default set to 'host'? I had a look at the code. This will be a great addition to PP. I want to get this available to all users as soon as we can! I think we are agreed that it cannot be included currently as there is no way to control the data, and no way to view it. So lets sort this out.... ----------------------------------- The deletion policies are no haste. The CGI code to define them needs amending. (This code is a picture of a tortured mind on another Friday afternoon, rather than crafted coding Yves consistently contributes.) Since you have followed the definition of the policies exactly, we only need to copy some code, change the table names, and a new menu option. My first question Tim, do you want to have a look and see what you think? Code is cgi_del_policy.c. Need to copy: void displayDeletePolicyBin() To new function: void displayDeletePolicySummaryBin() As I said, ignore all the logic, just change the table names and all should work. This is linked into the menu in perfgraph.c. ----------------------------------- Then the deletion policies need to be actioned. Again, copy similar code in the perfparse-db-purge code. This should be a very simple operation. ----------------------------------- Next, the --no-raw-data flag. Yves suggested this could be another callback to store the summary data. This worries me: 1. The call back will be identical to the existing one. 2. As we add more ways of analyzing data, more and more callbacks will be needed. I wonder as a an alternate option with one callback: Whether the attached modules should have their own option set, which is added to the main option set and displayed together when --help is shown, set by the same code. But this is complex for a small problem :) In the short term, I suggest making the option array visible to modules. Sorry, another global variable. They can read them and action them as they see fit. In this case we can now have two flags: --no-raw-data --no-raw-summary-data Which can be viewed in the function to store lines of data. What do you all think? This is one for my self or Yves to hack. ----------------------------------- There needs to be a function to automatically amend users tables, and update the schema number. See upgrade.c. No magic there. Also need to amend the mysql_create.sql and mysql_delete.sql. This can be released now as this does not effect functioning of the current versions. As I have done with the binary summary tables. ----------------------------------- Finally the display of data. I can think of various ways of displaying: - Report of activity for a day with summary. - Line graph showing percentage activity of each state. - Pie chart of summary.... - Exported CSV or XML reports. Tim, what do you want to see? ----------------------------------- Regards, Ben. Tim Wuyts wrote: > Hi, > > I've made some additions to storage_mysql.c to provide a summary table of > raw data (availability data) to perfparse. I also added two tables, > perfdata_summary_raw and perfdata_summary_raw_data. It's rather > straightforward stuff, so I guess it should be easy to incorporate into the > official version (if you think it's useful). > I followed Ben's ideas for the summary table, so that it can contain summary > for different 'epochs' (periods). > > Things on the TODO list: > - deletion policies: haven't read the docs on this yet. Are they still > uptodate? > - make summaries optional > - defaults (every service now gets a default summary with a epoch of 1 day) > - cgi report (-> I don't intend to write one. I don't really like c code > that printf's HTML ;)) > > And finally an important question: How do I submit my changes? I've never > used sourceforge (as a developer) before. For the moment, I just attached > the files to this email... > > Feedback always welcome! > > Regards, > Tim |