es-report

1.0.2 • Public • Published

##es-reports

Description

with this module you can make elasticsearch queries and create csv files with the results.

const es_report = require('es-report')

const host = 'www.elasticdata.com';
const port = 8080;
const saveTo = './mydir';
const mapHeaders = ['f1', 'f2', 'f3'];
const query = {
  	env: 'qa',
	service: 'yourapp',
	log_level: 'INFO',
	query: 'some query'
}

const mapItem = (item) => {
	console.log(item);
}

es_report.run(host, port, {
	query,
	mapItem,
	mapHeaders, // or a function
	saveTo,
});

Installation

$ npm install es-reports

Readme

Keywords

Package Sidebar

Install

npm i es-report

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

4.86 kB

Total Files

3

Last publish

Collaborators

  • idandagan1