Skip to content

Instantly share code, notes, and snippets.

View MelanieGault's full-sized avatar

Mélanie MelanieGault

View GitHub Profile
@MelanieGault
MelanieGault / taskjuggler-reports
Created August 13, 2014 23:57
taskjuggler reports with full and short views
navigator navbar {
hidereport @none
}
macro TaskTip [
tooltip istask() -8<-
'''Start: ''' <-query attribute='start'->
'''End: ''' <-query attribute='end'->
----
'''Resources:'''
@MelanieGault
MelanieGault / puppet-icinga2-nrpe_command
Last active August 29, 2015 14:05
sample: add new check with icinga2 module for puppet
icinga2::nrpe::command { 'check_ntp_peer':
command_name => 'check_ntp_peer',
nrpe_plugin_liddir => '/usr/lib64/nagios/plugins/',
nrpe_plugin_name => 'check_ntp_peer',
nrpe_plugin_args => '-H localhost -w 1 -c 2',
}
@@icinga2::object::service { "${::fqdn}_ntp":
object_servicename => 'ntp',
display_name => 'ntp',
@MelanieGault
MelanieGault / puppet-icinga2-server.pp
Last active August 29, 2015 14:05
puppet icinga2 : to add to server profile definition (basic)
icinga2::object::hostgroup { 'foo':
groups => ['foo2'],
assign_where => 'match(\"*bar*\", host.name)',
}
icinga2::object::servicegroup { 'foo':
groups => ['foo2'],
assign_where => 'match(\"*bar*\", service.name)',
}
@MelanieGault
MelanieGault / icinga2.te
Created September 25, 2014 02:56
selinux module for icinga2 all in one box
module my_httpd_icinga_command 1.0;
require {
type var_run_t;
type var_log_t;
type var_t;
type httpd_t;
type ping_t;
type postgresql_port_t;
type reserved_port_t;
@MelanieGault
MelanieGault / profile_icinga2.pp
Created September 25, 2014 02:58
extract of icinga2 selinux management with puppet
package { 'icinga2-classicui-config': ensure => installed, } -> # attention l'ordre est tres important...
package { 'icinga-gui': ensure => installed, }
exec { 'selinux management for icinga gui cgi':
command => '/usr/bin/chcon --reference=/var/www/cgi-bin -R /usr/lib64/icinga/cgi/',
subscribe => Package['icinga2-classicui-config', 'icinga-gui'],
refreshonly => true,
}
exec { 'selinux httpd_can_network_connect':