
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
nssl-kibana
Advanced tools
Kibana string static lookup table
(https://cinhtau.net/2018/08/27/static-lookup/) is a good way to make your logs more readable without indexing useless text.
This library try to reduce the "static" part by allowing setting this lookup table programmatically.
Each function take as last parameter an optional Connection
option (default to elasticsearch 7.10 client on http://localhost:9200
(or NSSLKIBANA_ES_URL
env) with .kibana
index).
You can instead pass your own elasticsearch client with different version and change the index to whatever kibana index is.
const nsslKibana = require('nssl-kibana');
const { Client } = require('@elastic/elasticsearch');
const esClient = new Client({
node: 'http://localhost:9200',
});
(async () => {
const indexPatternContent = await nsslKibana.getIndexPattern('logstash-*', {client: esClient});
})()
If you prefer to communicate via kibana api, you can pass an axiosInstance as a client.
const nsslKibana = require('nssl-kibana');
const axios = require('axios');
const axiosInstance = axios.create({
baseURL: 'http://127.0.0.1:5601/',
timeout: 5000,
headers: {
'Content-Type': 'application/json',
'kbn-xsrf': 'nssl-kibana',
'Authorization': 'Bearer my-super-secret',
},
});
(async () => {
const indexPatternContent = await nsslKibana.getIndexPattern('logstash-*', {client: axiosInstance});
})()
If you specify a string as client, it will try to connect to kibana api on http://localhost:9200
(or NSSLKIBANA_KIBANA_URL
env)
Straight forward function which take indexPattern
name and return indexPatternContent
.
Format is {id, attributes}
.
id
is the id of the index-pattern document and attributes
are specific to index-pattern kibana saved-objects.
Straight forward function which take indexPatternContent
object (as returned by getIndexPattern
) and set it in kibana.
This function takes an indexPattern
name, a fieldName
and an array of lookupEntry
({key, value}
)
If the field exists as a string in the index-pattern, the lookupEntries
array is set as static lookup for this field.
Instead of setting the third parameter as the new lookupEntries
for the fieldName
, it adds each lookup entry ({key, value}
) in the existent lookup.
If key already exists, the old value is replaced.
Only works for kibana adapter for now (throw UnsupportedFunctionError
for es adapter).
It works on existent index-pattern only, and refresh it as if you clicked on the Refresh fields list
button on http://:5601/app/kibana#/management/kibana/index_patterns/
FAQs
Edit static lookup for kibana index-pattern dynamically
We found that nssl-kibana demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.