SaltStack实战之远程执行-Returners

作者: ygqygq2 分类: 自动化 发布时间: 2017-06-09 18:01

SaltStack实战之远程执行-Returners


1. Returners列表

https://docs.saltstack.com/en/latest/ref/returners/all/index.html

returners description
carbon_return Take data from salt and “return” it into a carbon receiver
cassandra_cql_return Return data to a cassandra server
cassandra_return Return data to a Cassandra ColumnFamily
couchbase_return Simple returner for Couchbase.
couchdb_return S imple returner for CouchDB.
django_return A returner that will infor a Django system that returns are available using Django’s signal system.
elasticsearch_return Return data to an elasticsearch server for indexing.
etcd_return Return data to an etcd server or cluster
hipchat_return Return salt data via hipchat.
influxdb_return Return data to an influxdb server.
kafka_return Return data to a Kafka topic
local The local returner is used to test the returner interface, it just prints the
local_cache Return data to local job cache
memcache_return Return data to a memcache server
mongo_future_return Return data to a mongodb server
mongo_return Return data to a mongodb server
multi_returner Read/Write multiple returners
mysql Return data to a mysql server
nagios_return Return salt data to Nagios
odbc Return data to an ODBC compliant server.
pgjsonb Return data to a PostgreSQL server with json data stored in Pg’s jsonb data type
postgres Return data to a postgresql server
postgres_local_cache Use a postgresql server for the master job cache.
pushover_returner Return salt data via pushover (http://www.pushover.net)
rawfile_json Take data from salt and “return” it into a raw file containing the json, with one line per event.
redis_return Return data to a redis server
sentry_return Salt returner that reports execution results back to sentry.
slack_returner Return salt data via slack
sms_return Return data by SMS.
smtp_return Return salt data via email
splunk Send json response data to Splunk via the HTTP Event Collector
sqlite3_return Insert minion return data into a sqlite3 database
syslog_return Return data to the host operating system’s syslog facility
xmpp_return Return salt data via xmpp
zabbix_return Return salt data to Zabbix

2. 介绍mysql returner的用法

因mysql returner使用需要python MySQLdb模块,所以需要先安装MySQLdb模块。

2.1 安装pip和MySQLdb

在下列地址下载安装包。
https://pypi.python.org/pypi/setuptools
https://pypi.python.org/pypi/pip/

2.2 配置mysql数据库

使用官方的数据表结构,并给minion服务器相关权限。

2.2 配置salt-master

/etc/salt/master

重启master和minion服务

2.3 测试

master端执行命令。

在数据库中查看,salt_returns是否有数据进来。

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

发表评论

电子邮件地址不会被公开。 必填项已用*标注