puppet report import

简介: 把Puppet报告导入Puppet Dashboard   现在Dashboard正在运行,而我们需要确保它能够获取Puppet报告。完成这项工作有几种方法,开始的时候都是用Rake任务导入旧报告。在/usr/share/puppet-dashboard目录下,运行: $ rake RAILS_ENV=production reports:import    这个命令假设你的Puppet管理器在本地主机上,并将导入Puppet vardir目录里面的全部文件(目录通常是/var/lib/puppet/reports,但是你也可以用REPORT_DIR选项指定一个其他的目 录)。

把Puppet报告导入Puppet Dashboard

  现在Dashboard正在运行,而我们需要确保它能够获取Puppet报告。完成这项工作有几种方法,开始的时候都是用Rake任务导入旧报告。在/usr/share/puppet-dashboard目录下,运行:

$ rake RAILS_ENV=production reports:import

   这个命令假设你的Puppet管理器在本地主机上,并将导入Puppet vardir目录里面的全部文件(目录通常是/var/lib/puppet/reports,但是你也可以用REPORT_DIR选项指定一个其他的目 录)。你可以多次运行这个命令,或者用计划任务对其进行设置——它会识别以前导入的报告,并且只会添加新的报告。

  你还可以配置 Puppet,让它自动给Dashboard传送报告。完成这项工作有两种方法,第一种方法是针对Puppet 0.25.x版本以及更低版本,第二种方法则是针对Puppet 0.26.x版本以及更高版本。对于Puppet 0.25.x版本以及更低版本来说,请确保你在每个想要报告的客户端上开启报告功能,做法是在puppet.conf配置文件的[puppet]节中添加 report = true。然后在Puppet管理器上的puppet.conf文件中添加/usr/share/puppet-dashboard/lib /puppet到Puppet的libdir目录,命令如下:

[main]
libdir = /usr/share//puppet-dashboard/lib/puppet:/var/puppet/lib

  开启Puppet Dashboard报告:

[puppetmasterd]
reports = puppet_dashboard, any-other-reports

   这个报告假设你的Puppet Dashboard运行在本地主机端口3000上。你可以调整这个位置通过编辑文件/usr/share/puppet-dashboard/lib /puppet/puppet_dashboard.rb,并升级HOST和PORT选项在文件的顶部。

  在Puppet 2.6.x以及更高的版本中,你需要在你的客户端开启报告:

[agent]
report = true

  然后指定http报告类型,并用新的reporturl选项来指定目标主机和URL,代码如下:

[master]
reporturl=http://localhost:80/reports
reports=http

  更新主机和端口,以便跟你的环境相符(你应该保持URL上的报告后缀)。

  现在Puppet Dashboard应该能够接收你的Puppet报告了,大功告成!如果你按照本文的方法一直做到现在,那么你就应该可以看到Puppet Dashboard的主屏幕了。

 

  从这个屏幕上你可以看到目前所有的Puppet节点,以及Puppet运行的成功和失败状况(而且你还可深入研究显示的结果,以便查看哪些资源失败以及产生的错误等)。它为你的Puppet环境提供了一个强大的中心界面,环境状况一目了然。

   它还是一个相对较新的产品,所以人们每天都会为其添加新的功能(也可能是bug)。如果你有困难、问题、特别是想法和反馈意见,请登录Puppet Labs,从#puppet IRC通道获得帮助,或者通过Puppet邮件列表获得帮助。请开始使用吧,并让我们知道您的使用情况!

目录
相关文章
|
4月前
|
安全 开发者 C++
Windows10安装modelscope后import这个模块报错:OSError: [WinError 1] 函数不正确。: 'D:\Anaconda\envs\MDS\lib\site-packages\modelscope\utils\ast_utils.py'
Windows10安装modelscope后import这个模块报错:OSError: [WinError 1] 函数不正确。: 'D:\Anaconda\envs\MDS\lib\site-packages\modelscope\utils\ast_utils.py'
91 1
|
6月前
|
数据可视化 Python
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
|
3月前
|
Python
RuntimeError: The Werkzeug web server is not designed to run in production. Pass allow_unsafe_werkze
RuntimeError: The Werkzeug web server is not designed to run in production. Pass allow_unsafe_werkze
63 0
|
8月前
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
|
Python
rqalpha安装后使用报错:numpy.core.multiarray failed to import
rqalpha安装后使用报错:numpy.core.multiarray failed to import
64 0
|
NoSQL Python
解决gdb报错:Failed to import the site module,No module named '_sysconfigdata_m'
解决gdb报错:Failed to import the site module,No module named '_sysconfigdata_m'
338 0
|
Python
安装docx后,import提示Import Error: No module named ‘exceptions‘
安装docx后,import提示Import Error: No module named ‘exceptions‘
246 0
|
资源调度 JavaScript 前端开发
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
253 7
|
Python
Fatal Python error:initsite:Failed to import the site module
Fatal Python error:initsite:Failed to import the site module
494 0
Fatal Python error:initsite:Failed to import the site module
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
76 0