Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

influxdb-v1

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

influxdb-v1

A light-weight library to write data to InfluxDB v1

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
increased by0.5%
Maintainers
1
Weekly downloads
 
Created
Source

influxdb-v1

A light-weight library to write data to InfluxDB.

  • Parse Special Characters
  • Inbuilt Retry Mechanisms

Example

const influx = require('influxdb-v1');

await influx.write(
    {
      url: 'http://influx.url',
      db: 'database name'
    },
    [
      {
        measurement: 'web',
        fields: {
          load: 12.34
        }
      },
      {
        measurement: 'web',
        fields: {
          load: 5.4
        },
        tags: {
          host: 'linux'
        },
        timestamp: Date.now()
      }
    ]
  );

// or

const db = influx.db({ url: 'http://influx.url', db: 'database name'});
await db.write({
  measurement: 'web',
  fields: {
    load: 12.34
  }
});

// query

const db = influx.db({ url: 'http://influx.url', db: 'database name', username: 'user', password: 'pass' });
await db.query('SELECT * FROM measurement');
await db.flux('from(bucket:"telegraf")');

CLI

Insert Data

npx influxdb-v1 insert --url <influx-base-url> --username <user> --password <pass> --db <database> --measurement <measurement> --tags "key=value" --fields "key=value" --ts <timestamp>

Note

Inspired from influxdb-v2

Keywords

FAQs

Package last updated on 29 May 2022

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