# salt.returners.sqlite3

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

`salt.returners.sqlite3_return.` `get_fun`(fun)

  Return a dict of the last function called for all minions

`salt.returners.sqlite3_return.` `get_jid`(jid)

  Return the information returned from a specified jid

`salt.returners.sqlite3_return.` `get_jids`()

  Return a list of all job ids

`salt.returners.sqlite3_return.` `get_load`(jid)

  Return the load from a specified jid

`salt.returners.sqlite3_return.` `get_minions`()

  Return a list of minions

`salt.returners.sqlite3_return.` `returner`(ret)

  Insert minion return data into the sqlite3 database

`salt.returners.sqlite3_return.` `save_load`(jid, load)

  Save the load to the specified jid

Current Salt release: 0.17.1

#### Previous topic

salt.returners.smtp_return

#### Next topic

salt.returners.syslog_return

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd