serverspec 服务器配置测试工具

程序名称:serverspec

授权协议: MIT

操作系统: 跨平台

开发语言: Ruby

serverspec 介绍

serverspec 主要是为 Puppet,
Chef 和其他配置管理工具提供测试服务器配置的功能,也提供 RSpec 测试。

示例代码:

require 'serverspec'
require 'pathname'
require 'net/ssh'

include Serverspec::Helper::Ssh
include Serverspec::Helper::Debian

RSpec.configure do |c|
  # Add SSH before hook in case you use the SSH backend
  # (not required for the Exec backend)
  c.before do
    host  = File.basename(Pathname.new(example.metadata[:location]).dirname)
    if c.host != host
      c.ssh.close if c.ssh
      c.host  = host
      options = Net::SSH::Config.for(c.host)
      user    = options[:user] || Etc.getlogin
      c.ssh   = Net::SSH.start(c.host, user, options)
    end
  end
end

serverspec 官网

http://serverspec.org/

相关编程语言

IPTraf是一个使用简单的网络状况监视工具。
所谓 rootkit ,是一类入侵者经常使用的工具。这类工...
系统管理员可以利用Health Monitor 去监控网络中的每...
当服务器遭到黑客攻击时,在多数情况下,黑客可能对...
Hobbit是一个基于WEB用于监视系统运行状态和网络信息...
MX4J是Java管理扩展技术的一个开源实现,支持JSR3 (...