|
1 # PUPPI INFO README |
|
2 The puppi info commands executes scripts in /etc/puppi/info/ which are generated by templates provided by the puppi::info define |
|
3 These scripts are supposed to show status details on the omonimous info topic. |
|
4 |
|
5 ## SYNOPSIS (cli) |
|
6 puppi info [topic] [-i] |
|
7 |
|
8 ## EXAMPLES (cli) |
|
9 Show host-wide infos. Much stuff. |
|
10 puppi info |
|
11 |
|
12 Show info about apache (connections, processes, config, logs...) |
|
13 puppi info apache |
|
14 |
|
15 Interactively select the info topics you want to show |
|
16 puppi info -i |
|
17 |
|
18 Show complete info and send reports (email, rest ... ) |
|
19 puppi info -r yes |
|
20 |
|
21 Grep the output with the string defined |
|
22 puppi info -g <string> |
|
23 |
|
24 |
|
25 ## EXAMPLES (puppet) |
|
26 The basic define related to a info is puppi::info, it creates a script executed |
|
27 when running "puppi info $name" based on the provided template. |
|
28 Customize the template to customize the info you want to see. |
|
29 |
|
30 A sample that just runs commands using the default template: |
|
31 puppi::info { 'network': |
|
32 description => 'Network settings and stats' , |
|
33 run => [ 'ifconfig' , 'route -n' , 'cat /etc/resolv.conf' , 'netstat -natup | grep LISTEN' ], |
|
34 } |
|
35 |
|
36 You can have more useful and dedicated info topics using a custom puppi::info define inside your |
|
37 own defines. For example in a define that creates a tomcat instance you can add something like: |
|
38 puppi::info::instance { "tomcat-${instance_name}": |
|
39 servicename => "tomcat-${instance_name}", |
|
40 processname => "${instance_name}", |
|
41 configdir => "${tomcat::params::storedir}/${instance_name}/conf/", |
|
42 bindir => "${tomcat::params::storedir}/${instance_name}/bin/", |
|
43 pidfile => "${instance_rundir}/tomcat-${instance_name}.pid", |
|
44 datadir => "${instance_path}/webapps", |
|
45 logdir => "${instance_logdir}", |
|
46 httpport => "${instance_httpport}", |
|
47 controlport => "${instance_controlport}", |
|
48 ajpport => "${instance_ajpport}", |
|
49 templatefile=> "puppi/info/instance.erb", |
|
50 description => "Info for ${instance_name} Tomcat instance" , |
|
51 } |
|
52 which has custom arguments, feeded by the data you provided to the define, and a custom |
|
53 template file that uses these variables. |
|
54 |
|
55 ## EXAMPLES (with example42 puppet modules) |
|
56 If you use the old Example42 modules set you get automatically many service related infos out of the box to be used with Puppi One. |
|
57 NextGen modules are supposed to provide pupi info intergration on Puppi Two (TO DO) |
|
58 Just set (via an ENC, facts or manifests) $puppi=yes to enable puppi extensions autoloading. |
|
59 This will automatically deploy info topics related to the modules you use. |
|
60 |