pacman::repo { 'multilib':
order => 15,
- include => '/etc/pacman.d/mirrorlist'
+ include => '/etc/pacman.d/mirrorlist',
}
pacman::repo { 'immae':
order => 0,
server => 'https://git.immae.eu/releases/packages/',
- siglevel => 'Optional'
+ siglevel => 'Optional',
}
+ exec { "refresh pacman":
+ command => "/usr/bin/pacman -Sy",
+ refreshonly => true,
+ }
+
+ Concat["/etc/pacman.conf"] ~> Exec["refresh pacman"] -> Package <| name != "pacman" |>
+
class { 'aur': }
contain "pacman"
exit_code=$?
if [[ $exit_code -ne 0 ]]; then
- echo "UNKNOWN:Impossible to run psql command"
+ echo "UNKNOWN - Impossible to run psql command"
exit $STATE_UNKNOWN
elif [[ -z "$lag" ]]; then
- echo "UNKNOWN:No replication found for $user"
+ echo "UNKNOWN - No replication found for $user"
exit $STATE_UNKNOWN
else
output="Replication lag for $user is ${lag}s"
LC_ALL=C lag=$(printf "%.*f" 0 $lag)
if [[ $lag -lt 5 ]]; then
- echo "OK:$output"
+ echo "OK - $output"
exit $STATE_OK
elif [[ $lag -lt 10 ]]; then
- echo "WARNING:$output"
+ echo "WARNING - $output"
exit $STATE_WARNING
else
- echo "CRITICAL:$output"
+ echo "CRITICAL - $output"
exit $STATE_CRITICAL
fi
fi
content => template("profile/monitoring/naemon.cfg.erb"),
}
->
+ file { "/etc/naemon/objects.cfg":
+ ensure => "file",
+ owner => "naemon",
+ group => "naemon",
+ mode => "0600"
+ }
+ ->
service { "naemon":
ensure => "running",
enable => true,
@profile::monitoring::local_service { "Databases are present in postgresql":
sudos => {
- "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\ nspname\ from\ pg_catalog.pg_namespace"
+ "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\\ nspname\\ from\\ pg_catalog.pg_namespace"
},
local => {
check_command => "check_command_output!psql -c 'select nspname from pg_catalog.pg_namespace'!public!-r postgres",
},
local => {
- check_command => "check_postgresql_replication!$backup_host!/run/postgresql/!5432",
+ check_command => "check_postgresql_replication!$backup_host!/run/postgresql!5432",
}
}
}
include "profile::tools"
include "profile::postgresql"
include "profile::apache"
+ include "profile::monitoring"
ensure_packages(["npm"])
ensure_packages(["abiword"])