Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement database output #2

Closed
niedbalski opened this issue Jun 16, 2020 · 0 comments · Fixed by #4
Closed

Implement database output #2

niedbalski opened this issue Jun 16, 2020 · 0 comments · Fixed by #4
Labels
Milestone

Comments

@niedbalski
Copy link
Owner

Repeat should support storing each collection output into a
database table that can be later queried by a jupyter notebook or a python
dataframe extension.

collections:
  process_list:
[...]
    store: database
    database:
      map-values:
        separator: " "
        fields:
          - name: value
            type: string
            idx: 0

For achieving this, the configuration file should be extended for each collection to be
able to decide which storage backend should be in use (database, file)

If database is selected, a map-values section should be defined, this section
should have the following fields (primarly identified ones)

  • separator: which character separates each field in the output.
  • type: the type of the field
  • idx: the index (from 0 index) in the command output after splitting by the separator
  • name: the name of the field in the database

As an example:

collections:

  process_list:
    command: ps auxh
    run-every: 2s
    exit-codes: any
    store: database
    database:
      map-values:
        separator: " "
        fields:
          - name: value
            type: string
            idx: 0
@niedbalski niedbalski added this to the 0.2.0 milestone Jun 16, 2020
@niedbalski niedbalski linked a pull request Jul 3, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant