|
| 1 | +!SLIDE subsectionnonum |
| 2 | +# Monitoring |
| 3 | + |
| 4 | +!SLIDE smbullets small |
| 5 | +# Foreman & Smart Proxy |
| 6 | + |
| 7 | +* Foreman |
| 8 | + * Webinterface should be available using HTTPs include "Welcome to foreman" |
| 9 | + * Provisioning requires also HTTP requests being answered |
| 10 | + * Foreman log should not have entries "500 Internal Server Error" |
| 11 | + |
| 12 | +* Smart proxy |
| 13 | + * Query the feature list for expected features |
| 14 | + * Smart proxies log should not have entries "ERROR" |
| 15 | + |
| 16 | +~~~SECTION:handouts~~~ |
| 17 | +
|
| 18 | +**** |
| 19 | +
|
| 20 | +For monitoring Foreman you should include a check to verify if the Webinterface is available using HTTPs and |
| 21 | +if it includes the string "Welcome to foreman" as it is possible that it shows a stracktrace if something is |
| 22 | +goes wrong. If using monitoring plugins with Icinga or something similar you could use check_http. |
| 23 | +
|
| 24 | + check_http -H foreman.localdomain -p 443 -S -f follow -s 'Welcome to Foreman' |
| 25 | +
|
| 26 | +During provisioning also plain HTTP requests will be required, but you can not simulate exactly this request |
| 27 | +because of redirect rules directing the request to HTTPs. |
| 28 | +
|
| 29 | + check_http -H foreman.localdomain -e 301 |
| 30 | +
|
| 31 | +Log entries containing "500 Internal Server Error" will typically indicate a software failure caused by |
| 32 | +something not running properly or a bug. Check_logfiles provided at http://labs.consol.de could be used |
| 33 | +to monitor. |
| 34 | +
|
| 35 | + check_logfiles --logfile /var/log/foreman/production.log --rotation loglogdate8logdate8gz \ |
| 36 | + --criticalpattern '500 Internal Server Error' --tag foreman |
| 37 | +
|
| 38 | +~~~PAGEBREAK~~~ |
| 39 | +
|
| 40 | +To monitor the Smart proxy query the feature list for expected features as a feature will be deactivated if |
| 41 | +an error during startup occures. |
| 42 | +
|
| 43 | + check_http -H foreman.localdomain -S -p 8443 -u /features -s '["dhcp","dns","logs","puppet","puppetca","tftp"]' |
| 44 | +
|
| 45 | +In the log monitor for entries marked as "ERROR". |
| 46 | +
|
| 47 | + check_logfiles --logfile /var/log/foreman-proxy/proxy.log --rotation loglogdate8gz \ |
| 48 | + --criticalpattern 'ERROR' --tag foreman-proxy |
| 49 | +
|
| 50 | +~~~ENDSECTION~~~ |
| 51 | +
|
| 52 | +!SLIDE smbullets small |
| 53 | +# Managed Services |
| 54 | +
|
| 55 | +* Puppet: Query for a catalog |
| 56 | +* TFTP: Try to get a small file like pxelinux.cfg/default |
| 57 | +* DNS: Query DNS for a specific combination of name and address |
| 58 | +* DHCP: Try to get a DHCPOFFER from a system not being the DHCP server |
| 59 | +
|
| 60 | +~~~SECTION:handouts~~~ |
| 61 | +
|
| 62 | +**** |
| 63 | +
|
| 64 | +Best way to verify that Puppet is available is trying to get a catalog and check it for some |
| 65 | +content like the name. It will require to use the client certificate of the host for authentication. |
| 66 | +For Puppet 3 this could look like this. |
| 67 | +
|
| 68 | + check_http -H foreman.localdomain -S -p 8140 \ |
| 69 | + -J /var/lib/puppet/ssl/certs/foreman.localdomain.pem \ |
| 70 | + -K /var/lib/puppet/ssl/private_keys/foreman.localdomain.pem \ |
| 71 | + -u /production/catalog/foreman.localdomain \ |
| 72 | + -s '"name":"foreman.localdomain"' |
| 73 | +
|
| 74 | +To verify TFTP working fine try to get a small file like pxelinux.cfg/default (which you need to create). |
| 75 | +There are several plugins available like the one provided at http://william.leibzon.org/nagios/ |
| 76 | +
|
| 77 | + check_tftp foreman.localdomain pxelinux.cfg/default |
| 78 | +
|
| 79 | +~~~PAGEBREAK~~~ |
| 80 | +
|
| 81 | +DNS functionality is best checked by a specific combination of name and address and could be simply included |
| 82 | +for every host. |
| 83 | +
|
| 84 | + check_dns -s foreman.localdomain -H foreman.localdomain -a 10.0.0.2 |
| 85 | +
|
| 86 | +DHCP providing DHCPOFFERS can only be verifed from systems not being the DHCP server and should ask a specific |
| 87 | +DHCP server to ensure answers are not provided from another system. |
| 88 | +
|
| 89 | + check_dhcp -s 10.0.0.2 -r 10.0.0.102 -u |
| 90 | +
|
| 91 | +~~~ENDSECTION~~~ |
0 commit comments