Insert minion return data into a sqlite3 database
maintainer: | Mickey Malone <mickey.malone@gmail.com> |
---|---|
maturity: | New |
depends: | None |
platform: | All |
Sqlite3 is a serverless database that lives in a single file. In order to use this returner the database file must exist, have the appropriate schema defined, and be accessible to the user whom the minion process is running as. This returner requires the following values configured in the master or minion config:
returner.sqlite3.database: /usr/lib/salt/salt.db
returner.sqlite3.timeout: 5.0
Use the commands to create the sqlite3 database and tables:
sqlite3 /usr/lib/salt/salt.db << EOF
--
-- Table structure for table 'jids'
--
CREATE TABLE jids (
jid TEXT PRIMARY KEY,
load TEXT NOT NULL
);
--
-- Table structure for table 'salt_returns'
--
CREATE TABLE salt_returns (
fun TEXT KEY,
jid TEXT KEY,
id TEXT KEY,
fun_args TEXT,
date TEXT NOT NULL,
full_ret TEXT NOT NULL,
success TEXT NOT NULL
);
EOF
To use the sqlite returner, append '--return sqlite' to the salt command. ex:
salt '*' test.ping --return sqlite
Return a dict of the last function called for all minions
Return the information returned from a specified jid
Return a list of all job ids
Return the load from a specified jid
Return a list of minions
Do any work necessary to prepare a JID, including sending a custom id
Insert minion return data into the sqlite3 database
Save the load to the specified jid
Docs for previous releases are available on salt.rtfd.org.
Latest Salt release: 2014.1.13
Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.
22.23.3.1.18. salt.returners.smtp_return
22.23.3.1.20. salt.returners.syslog_return
Upcoming SaltStack events, webinars and local meet ups and user groups.