Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Two questions about hashes

by ig (Vicar)
on May 31, 2011 at 09:21 UTC ( #907427=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Two questions about hashes
in thread Two questions about hashes

If you are building the data structures yourself, you should be able to build them to make using them easy. Knowing so little about what you are doing, it is difficult to give helpful advice. How are you building your data structures? Where does the data come from and how is it organized? What do you want to do with your data structures once you have them? If you post a working example program, complete with input data and desired output, there are probably many people here who would help you improve it.


Comment on Re^3: Two questions about hashes
Re^4: Two questions about hashes
by i5513 (Monk) on Jun 01, 2011 at 09:47 UTC
    Hi,
    
    I'm basically getting data from two different sources:
    
    apache + tomcat + jboss + ... configuration
    custom apps logs
    
    With configuration I want to create a cmdb where I can link together host where we have apps (typical proxypass + mod_jk + tomcat combo)
    
    And with custom application logs, I want to resume it with stats and maybe with graphs
    
    So typically I have:
    
    $apache{host}{$host}{vhost}{$vhost}{route}{$route}{proxypass}...
    
    or 
    
    $log{date}{$date}{level}{$level}{user}{$user}{module}{$module}{msg}{$msg}
    
    And I always was thinking about what is better if recollect all data in only one way or duplicate the info like:
    
    $apache{route}{$route}{host}{$host}{vhost}{$vhost}...
    
    I think it is better have one unique site where you can after extract what do you want exploring it.
    
    Thank you very much !
    
    

      Duplicating the data/info is generally not a good thing to do, though sometimes it is convenient.

      You have configuration and log files. You have no choice about how these are organized - they are as the respective software requires or produces them.

      You are trying to produce some results, which you haven't described but which are likely to be very relevant to answering your questions about how best to organize your data.

      Are you storing the data somewhere (i.e. after analyzing the configuration and log files and producing summaries, stats and graphs, are these stored in a database of some sort? Or are you producing them "on-the-fly" each time you want them?

      Once you have your data structures, how are you using them?

      How is having the nested structure a benefit to what you are doing?

        Hi,
        
        I'm saving configuration data in csv, and after I process it to generate useful output and diagrams (with blockdiag |python, I don't know if there is something similar inside perl world|)
        
        I want to sumarize the logs files, I will take a look to logstatd 1. I would like to draw rrdtool graphics with info about how many logs (and of which class) are thought the time. Generally I run this script on the fly to generate stats and (in the future) graphics.
        
        Without nested structured I could not get config/logs info (ehi! I could create classes and objects and play with oo, but I prefer to do it with perl structures)
        
        Thank you for your valuable tips!
        |1| http://search.cpan.org/~vvu/Log-Statistics-0.051/bin/logstatsd
        
        PD: Is there any tip behind "pre / pre " to not use html style in perlmonks comments ?
        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://907427]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2014-07-24 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (157 votes), past polls