Skip to content

Instantly share code, notes, and snippets.

Jon Skarpeteig Yuav

  • Norway
Block or report user

Report or block Yuav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Jenkins-php-pipeline
pipeline {
agent any
stages {
stage('Prepare') {
steps {
sh 'composer install'
sh 'rm -rf build/api'
sh 'rm -rf build/coverage'
sh 'rm -rf build/logs'
View puppet-monitoring-stages2.pp
refacter { 'monitoring':
patterns => [
'^apache_',
],
}
Service <| title != 'collectd' |> {
before +> Class['monitoring::metrics::collectd'],
notify +> Refacter['monitoring']
}
View puppet-monitoring-stages1.pp
stage { 'last': }
Stage['main'] -> Stage['last']
class { 'apache2': }
class { 'monitoring':
stage => last
}
View puppet-monitoring-factpattern2.pp
node 'www1.example.com' {
include ::apache
include ::monitoring
}
View puppet-monitoring-factpattern1.pp
if ($::apache_statuspage_enabled) {
include ::collectd::plugin::apache
}
View puppet-monitoring-antipattern2.pp
node 'www1.example.com' {
include ::apache
sensu::check { 'apache2':
command => 'check-process.rb --pattern apache2 --warn-under 1'
}
}
View puppet-monitoring-antipattern1.pp
class apache2 {
package { 'apache2': ensure => present }
service { 'apache2:' ensure => running }
sensu::check { 'apache2':
command => 'check-process.rb --pattern apache2 --warn-under 1'
}
}
@Yuav
Yuav / build.xml
Last active Jun 22, 2016
Puppet module testing with acceptance tests in parallel using Apache Ant. Simplifies integration with Jenkins
View build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="build">
<target name="build" depends="clean,bundle-install,syntax,lint">
<antcall target="spec" />
<antcall target="acceptance" />
</target>
<target name="clean">
<delete includeemptydirs="true" removeNotFollowedSymlinks="true" failonerror="false">
View gist:5716947
View logstash.conf
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
You can’t perform that action at this time.