System configuration for OpenStack Infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cacti.pp 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Class to configure cacti on a node.
  2. class openstack_project::cacti (
  3. $sysadmins = []
  4. ) {
  5. if $::osfamily != 'Debian' {
  6. fail("${::osfamily} is not supported.")
  7. }
  8. class { 'openstack_project::server':
  9. iptables_public_tcp_ports => [80, 443],
  10. sysadmins => $sysadmins,
  11. }
  12. include ::httpd
  13. if ! defined(Httpd::Mod['rewrite']) {
  14. httpd::mod { 'rewrite':
  15. ensure => present,
  16. }
  17. }
  18. package { 'cacti':
  19. ensure => present,
  20. }
  21. file { '/etc/apache2/conf.d/cacti.conf':
  22. ensure => present,
  23. source => 'puppet:///modules/openstack_project/cacti/apache.conf',
  24. mode => '0644',
  25. owner => 'root',
  26. group => 'root',
  27. require => Package['cacti'],
  28. }
  29. file { '/usr/local/share/cacti/resource/snmp_queries':
  30. ensure => directory,
  31. owner => 'root',
  32. }
  33. file { '/usr/local/share/cacti/resource/snmp_queries/net-snmp_devio.xml':
  34. ensure => present,
  35. source => 'puppet:///modules/openstack_project/cacti/net-snmp_devio.xml',
  36. mode => '0644',
  37. owner => 'root',
  38. group => 'root',
  39. require => File['/usr/local/share/cacti/resource/snmp_queries'],
  40. }
  41. file { '/var/lib/cacti/linux_host.xml':
  42. ensure => present,
  43. source => 'puppet:///modules/openstack_project/cacti/linux_host.xml',
  44. mode => '0644',
  45. owner => 'root',
  46. group => 'root',
  47. require => File[
  48. '/usr/local/share/cacti/resource/snmp_queries/net-snmp_devio.xml'
  49. ],
  50. }
  51. file { '/usr/local/bin/create_graphs.sh':
  52. ensure => present,
  53. source => 'puppet:///modules/openstack_project/cacti/create_graphs.sh',
  54. mode => '0744',
  55. owner => 'root',
  56. group => 'root',
  57. }
  58. exec { 'cacti_import_xml':
  59. command => '/usr/bin/php -q /usr/share/cacti/cli/import_template.php --filename=/var/lib/cacti/linux_host.xml --with-template-rras',
  60. cwd => '/usr/share/cacti/cli',
  61. require => File['/var/lib/cacti/linux_host.xml'],
  62. }
  63. $cacti_hosts = [
  64. 'afs01.dfw.openstack.org',
  65. 'afs01.ord.openstack.org',
  66. 'afsdb01.openstack.org',
  67. 'afsdb02.openstack.org',
  68. 'apps.openstack.org',
  69. 'ask.openstack.org',
  70. 'eavesdrop.openstack.org',
  71. 'elasticsearch01.openstack.org',
  72. 'elasticsearch02.openstack.org',
  73. 'elasticsearch03.openstack.org',
  74. 'elasticsearch04.openstack.org',
  75. 'elasticsearch05.openstack.org',
  76. 'elasticsearch06.openstack.org',
  77. 'elasticsearch07.openstack.org',
  78. 'etherpad-dev.openstack.org',
  79. 'etherpad.openstack.org',
  80. 'git.openstack.org',
  81. 'git01.openstack.org',
  82. 'git02.openstack.org',
  83. 'git03.openstack.org',
  84. 'git04.openstack.org',
  85. 'git05.openstack.org',
  86. 'git06.openstack.org',
  87. 'git07.openstack.org',
  88. 'git08.openstack.org',
  89. 'grafana.openstack.org',
  90. 'graphite.openstack.org',
  91. 'groups-dev.openstack.org',
  92. 'groups.openstack.org',
  93. 'health.openstack.org',
  94. 'jenkins-dev.openstack.org',
  95. 'jenkins.openstack.org',
  96. 'jenkins01.openstack.org',
  97. 'jenkins02.openstack.org',
  98. 'jenkins03.openstack.org',
  99. 'jenkins04.openstack.org',
  100. 'jenkins05.openstack.org',
  101. 'jenkins06.openstack.org',
  102. 'jenkins07.openstack.org',
  103. 'kdc01.openstack.org',
  104. 'kdc02.openstack.org',
  105. 'lists.openstack.org',
  106. 'logstash-worker01.openstack.org',
  107. 'logstash-worker02.openstack.org',
  108. 'logstash-worker03.openstack.org',
  109. 'logstash-worker04.openstack.org',
  110. 'logstash-worker05.openstack.org',
  111. 'logstash-worker06.openstack.org',
  112. 'logstash-worker07.openstack.org',
  113. 'logstash-worker08.openstack.org',
  114. 'logstash-worker09.openstack.org',
  115. 'logstash-worker10.openstack.org',
  116. 'logstash-worker11.openstack.org',
  117. 'logstash-worker12.openstack.org',
  118. 'logstash-worker13.openstack.org',
  119. 'logstash-worker14.openstack.org',
  120. 'logstash-worker15.openstack.org',
  121. 'logstash-worker16.openstack.org',
  122. 'logstash-worker17.openstack.org',
  123. 'logstash-worker18.openstack.org',
  124. 'logstash-worker19.openstack.org',
  125. 'logstash-worker20.openstack.org',
  126. 'logstash.openstack.org',
  127. 'nodepool.openstack.org',
  128. 'openstackid.org',
  129. 'paste.openstack.org',
  130. 'pbx.openstack.org',
  131. 'planet.openstack.org',
  132. 'proposal.slave.openstack.org',
  133. 'puppetdb.openstack.org',
  134. 'puppetmaster.openstack.org',
  135. 'pypi.bhs1.openstack.org',
  136. 'pypi.dfw.openstack.org',
  137. 'pypi.gra1.openstack.org',
  138. 'pypi.iad.openstack.org',
  139. 'pypi.nyj01.openstack.org',
  140. 'pypi.openstack.org',
  141. 'pypi.ord.openstack.org',
  142. 'pypi.region-b.geo-1.openstack.org',
  143. 'pypi.regionone.openstack.org',
  144. 'release.slave.openstack.org',
  145. 'review-dev.openstack.org',
  146. 'review.openstack.org',
  147. 'stackalytics.openstack.org',
  148. 'static.openstack.org',
  149. 'status.openstack.org',
  150. 'subunit-worker01.openstack.org',
  151. 'translate.openstack.org',
  152. 'translate-dev.openstack.org',
  153. 'wiki.openstack.org',
  154. 'zm01.openstack.org',
  155. 'zm02.openstack.org',
  156. 'zm03.openstack.org',
  157. 'zm04.openstack.org',
  158. 'zm05.openstack.org',
  159. 'zm06.openstack.org',
  160. 'zm07.openstack.org',
  161. 'zm08.openstack.org',
  162. 'zuul.openstack.org',
  163. ]
  164. openstack_project::cacti_device { $cacti_hosts: }
  165. }