#228: Creating Services - Rmhibbert/oe2-group-c GitHub Wiki
Link to ticket: https://rt.dataraster.com/Ticket/Display.html?id=228&results=00b04e4d9c1f6f216a0b5bec4d46e52b
Create the services
Change the directory
Description: Change the directory so you can access the config file
Command: cd /etc/puppetlabs/code/modules/nagios/manifests and sudo nano config.pp
SSH
Description: Add the ssh server
Command: nagios_service { "ssh": service_description => "SSH Servers", hostgroup_name => "my-ssh-servers", target => "/etc/nagios4/conf.d/ppt_services.cfg", check_command => "check_ssh", max_check_attempts => 3, retry_check_interval => 1, normal_check_interval => 5, check_period => "24x7", notification_interval => 30, notification_period => "24x7", notification_options => "w,u,c", contact_groups => "admins", mode => "0644", }
DB
Description: Add the DB server
Command: nagios_service { "db-c": service_description => "DB Servers", hostgroup_name => "my-database-server", target => "/etc/nagios4/conf.d/ppt_services.cfg", check_command => "check_ssh", max_check_attempts => 3, retry_check_interval => 1, normal_check_interval => 5, check_period => "24x7", notification_interval => 30, notification_period => "24x7", notification_options => "w,u,c", contact_groups => "admins", mode => "0644", }