omd through puppet

[root@puppetmaster ~]#puppet module search omd

[root@puppetmaster ~]#puppet module install tanny1910-omd

[root@puppetmaster ~]# puppet module search epel

[root@puppetmaster ~]# puppet module install stahnma-epel

[root@puppetmaster ~]# cat /etc/puppet/manifests/site.pp
hiera_include(“classes”)

[root@puppetmaster ~]# cat /etc/puppet/hieradata/common.yaml

classes:
– ‘epel’
– ‘omd’
– ‘omd::check_mk::agent’
– ‘omd::check_mk::plugins::puppet’

————————————————— client -side ——————————————–

[root@puppetserver ~]# rpm -Uvh https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm
Retrieving https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm
Preparing… ################################# [100%]
Updating / installing…
1:labs-consol-stable-1.3-1 ################################# [100%]

[root@puppetserver ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppetserver.admin.com
Info: Applying configuration version ‘1466004180’
Notice: /Stage[main]/Omd/Package[omd]/ensure: created
Error: Could not start Service[omd]: Execution of ‘/usr/bin/systemctl start omd’ returned 6: Failed to start omd.service: Unit omd.service failed to load: No such file or directory.
Error: /Stage[main]/Omd/Service[omd]/ensure: change from stopped to running failed: Could not start Service[omd]: Execution of ‘/usr/bin/systemctl start omd’ returned 6: Failed to start omd.service: Unit omd.service failed to load: No such file or directory.
Notice: Finished catalog run in 246.40 seconds

[root@puppetserver ~]# omd create prod
Adding /omd/sites/prod/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/prod/tmp…OK
Restarting Apache…OK
Created new site prod with version 1.30.

The site can be started with omd start prod.
The default web UI is available at http://puppetserver.admin.com/prod/
The admin user for the web applications is omdadmin with password omd.
Please do a su – prod for administration of this site.

[root@puppetserver ~]# su – prod
OMD[prod]:~$ omd start
Starting rrdcached…OK
Starting npcd…OK
Starting nagios…OK
Starting dedicated Apache for site prod…OK
Initializing Crontab…OK

[root@puppetserver ~]# systemctl enable omd
omd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig omd on

[root@puppetserver ~]# chkconfig –list |grep omd
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use ‘systemctl list-unit-files’.
To see services enabled on particular target use
‘systemctl list-dependencies [target]’.

omd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Leave a comment