dev/provisioning/modules/puppi/README_log.md
changeset 28 b0b56e0f8c7f
equal deleted inserted replaced
27:a2342f26c9de 28:b0b56e0f8c7f
       
     1 # PUPPI LOG README
       
     2 Documentation and examples related to the puppi action log
       
     3 
       
     4 ## SYNOPSIS (cli)
       
     5         puppi log [topic] [-i]
       
     6 
       
     7 ## EXAMPLES (cli)
       
     8 
       
     9 Tails (tail -10f) all the known logs.
       
    10         puppi log
       
    11 
       
    12 Tails only the logs related to the given topic
       
    13         puppi log apache
       
    14 
       
    15 Choose interactively which logs to show
       
    16         puppi log
       
    17 
       
    18 Grep the output with the string defined
       
    19         puppi log -g <string>
       
    20 
       
    21 ## EXAMPLES (puppet)
       
    22 The basic define related to a log is:
       
    23         puppi::log
       
    24 it creates a file in /etc/puppi/logs/ with one or more logs paths.
       
    25 
       
    26 A simple, operating system aware, example might be:
       
    27         puppi::log { 'auth':
       
    28           description => 'Users and authentication' ,
       
    29           log => $::operatingsystem ? { 
       
    30             redhat => '/var/log/secure',
       
    31             darwin => '/var/log/secure.log',
       
    32             ubuntu => ['/var/log/user.log','/var/log/auth.log'],
       
    33           }
       
    34         }
       
    35 
       
    36 but also something that uses variables Puppet already knows
       
    37         puppi::log { "tomcat-${instance_name}":
       
    38           log => "${tomcat::params::storedir}/${instance_name}/logs/catalina.out"
       
    39         }
       
    40 
       
    41 EXAMPLES (with example42 puppet modules)
       
    42 If you use the old Example42 modules set you get automatically many service related logs out of the box to be used with Puppi One.
       
    43 NextGen modules are supposed to provide puppi log intergration on Puppi Two (TO DO)
       
    44