Socket
Socket
Sign inDemoInstall

@modus/gimbal-plugin-mysql

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modus/gimbal-plugin-mysql

MySQL storage helpers for Gimbal and Gimbal plugins


Version published
Weekly downloads
13
decreased by-31.58%
Maintainers
3
Weekly downloads
 
Created
Source

Gimbal mysql Plugin

npm (scoped) npm CircleCI PRs Welcome MIT Licensed Powered by Modus_Create

A Gimbal plugin to allow storage of data in MySQL.

Installation

First, you need to install the plugin to your project:

# with npm
npm install --save-dev @modus/gimbal-plugin-mysql

# or with yarn
yarn add --dev @modus/gimbal-plugin-mysql

Next, you need to add the plugin to your Gimbal configuration file:

YAML

plugins:
  - '@modus/gimbal-plugin-mysql'

JSON

{
  "plugins": ["@modus/gimbal-plugin-mysql"]
}

JavaScript

modules.exports = {
  plugins: ['@modus/gimbal-plugin-mysql'],
};

Configuration

In order to connect to a MySQL server, you must provide the host, password, and username via environment variables:

  • GIMBAL_MYSQL_HOST - Defaults to localhost, must be the host location of the server.
  • GIMBAL_MYSQL_USERNAME - Defaults to root, must be the username to connect to the server with.
  • GIMBAL_MYSQL_PASSWORD - Must be the password of the user in order to connect to the server.

@modus/gimbal-plugin-last-value

Allows for getting and saving last value reports. To enable this support, you need to set lastValue on the plugin config:

plugins:
  - plugin: '@modus/gimbal-plugin-mysql'
    lastValue: true

By default, this will use gimbal as the database and gimbal_archive table. To change these values, pass an object to the lastValue config:

plugins:
  - plugin: '@modus/gimbal-plugin-mysql'
    lastValue:
      database: my-database
      table: test_runs

The database must exist. If the table does not exist, the follow SQL will be executed:

CREATE TABLE IF NOT EXISTS <table_name> (command VARCHAR(255) NOT NULL, date DATETIME NOT NULL, report LONGTEXT NOT NULL) ENGINE=INNODB;

FAQs

Package last updated on 11 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc