Logstash Metrics client is a Vue typescript plugin to send metrics to a logstash instance.
The input type of your logstash pipeline must be http
Add the plugin to vue
import LogstashMetrics from "logstash-metrics-client/index"
Vue.use(LogstashMetrics, {
ls_url: "http://logstash:8080",
production: process.env.NODE_ENV == "production"
})
option | default | description |
---|---|---|
ls_url |
undefined |
URL to your logstash instance. If undefined or empty, the metrics will be ignored |
production |
true |
Set to false, to log the metrics to console |
LogstashMetrics.metric("login", {
"user": "username"
});