- 论坛徽章:
- 0
|
FUNC 使用指南
http://www.opensolution.org.cn/?p=158
1. Func 简介:
- Fedora 统一网络控制器
- Fedora Unified Network Controller
- 可以用在RedHat系列产品上
- 是为了解决统一管理监控问题,而设计开发的系统管理基础框架
1.1. Func 功能特性
- Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组
- Func 命令行可以直接发送远程命令或者远程获取数据
- Func 通讯基于 XMLRPC 和 SSL 标准协议
- 新装服务器也可以在 Kickstart 文件中自动安装 Func,自动注册到主控服务器
1.2. Func 基于主控端与被控端
- 建立了 Master - Slaves 主从 SSL 证书管控体系,可以将证书自动分发到所有受控服务器
1.3. Func 网络架构图
![]()
1.4. Func 安装
1.5. Func 服务端配置
- /etc/certmaster/certmaster.conf 编辑,允许autosign == yes
- 让certmaster启动
1.6. Func 客户端配置
- 在 /etc/certmaster/minion.conf 指定certmaster服务器
- 让funcd服务器启动
1.7. 查看客户端是否注册成功
- 在服务端上看有多少台客户端注册 certmaster-ca --list-sign
或
ls /var/lib/certmaster/certmaster/certs/
1.8. 删除客户端主机 certmaster-ca -c hostname
或
rm /var/lib/certmaster/certmaster/certs/hostname.cert
1.9. 如果客户端主机重装了怎么办
- 必须在服务端删除此客户机的cert文件 rm /var/lib/certmaster/certmaster/certs/hostname.cert
1.10. 如果在服务端删掉了客户端的 .cert文件怎么办
- 可以将client的 /etc/pki/certmaster/hostname.cert 拷贝过来
- 将client 的/etc/pki/certmaster/hostname.*也删掉,再重启funcd,cert文件会自动传输过来
2. Func 常用模块功能介绍
2.1. Func Modules 列表 CommandModule -- Running Arbitrary Commands Like SSH Does
IPtablesModule -- iptables management
NetworkTest -- Test out network stuff.
ProcessModule -- Process Info, memory usage, and Killing
ServiceModule --Service Status and Control
JBossModule -- monitoring and control jboss instances
HardwareModule -- Hardware Profilling
MountModule -- mount, unmount, and query mounted resources
NagiosCheck -- be able to call Nagios plugins and get their results,without needing to install nagios. Works with any plugin
Modules 列表参考网址
2.1.1. CommandModule 模块
func hostname call command run command
func ’ssh-1′ call command run /usr/bin/uptime
func ’ssh-1′ call command run “date -s 09:47:40“
func ’ssh-1′ call command run “hwclock -w“
func “ssh-1″ call command run “cat /proc/cpuinfo” 不过排列不好看
2.1.2. ServiceModule 模块
Func hostname call service start/stop/restart servername
func ssh-1 call service start httpd
func ssh-1 call service stop sendmail
Func ssh-1 call service restart named
2.1.3. HardwareModule 模块
func hostname call hardware info
-例:
func ’ssh-1′ call hardware info
如果不能执行一般是因为 smolt 没有安装
2.1.4. IPtablesModule 模块
func hostname call iptables command
func “ssh-1″ call iptables policy func “ssh-1″ call iptables dump func “ssh-1″ call iptables.port drop_to 53 192.168.0.0/24 udp src
func ’ssh-1′ call iptables run “-L INPUT” func ’ssh-1′ call iptables policy OUTPUT DROP func ’ssh-1′ call iptables drop_from 192.168.0.10
- 格式: Func hostname call command run command
- 例: func ’ssh-1′ call command run ‘iptables -A INPUT -s 192.168.239.233 -j DROP’
2.1.5. JBossModule 模块
func hostname call jboss command
func “*” call jboss status
func “*” call jboss check
func “*” call jboss search_by_instance “default“
func “*” call jboss search_by_address “127.0.0.1“
func “*” call jboss search_by_port 8080
2.1.6. ProcessModule 模块
Func hostname call process command
func ssh-1 call process info “aux”
func ssh-1 call process mem
func ssh-1 call process kill httpd SIGHUP
2.1.7. SysctlModule 模块
Func hostname call sysctl command
func ssh-1 call sysctl list
func “*” call sysctl get func “*” call sysctl set
func ssh-1 call sysctl set net.ipv4.tcp_syncookies 1
2.1.8. RpmModule模块 ( =rpm –qa )
func ssh-1 call rpms inventory
2.1.9. SmartModule模块 ( 看硬盘信息 )
func ssh-1 call smart info
2.1.10. YumModule模块
func ssh-1 call yumcmd update
func ssh-1 call command run ‘yum update’
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/504/showart_1685801.html |
|