Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash 6.2 #2

Open
Misairu opened this issue Feb 16, 2018 · 0 comments
Open

Logstash 6.2 #2

Misairu opened this issue Feb 16, 2018 · 0 comments

Comments

@Misairu
Copy link

Misairu commented Feb 16, 2018

I discovered that existing script do not return pipeline stats with Logstash 6.2
spoiler alert: pipeline now called pipelines

https://www.elastic.co/guide/en/logstash/current/node-stats-api.html

Manual says that we do not need python and head anymore (API can transmit stats in pretty json format by itself)

That is my version of your script

#!/bin/bash

case $1 in
status )
initctl status logstash | grep -q running && echo 1 || echo 0 ;;
heap_bytes )
curl -s 'localhost:9600/_node/stats/jvm?pretty' | grep "heap_used_in_bytes | awk '{ print $3 }' | sed 's/,//' ;;
heap_percent )
curl -s 'localhost:9600/_node/stats/jvm?pretty' | grep "heap_used_percent | awk '{ print $3 }' | sed 's/,//' ;;
heap_max )
curl -s 'localhost:9600/_node/stats/jvm?pretty' | grep "heap_max_in_bytes | awk '{ print $3 }' | sed 's/,//' ;;
events_in )
curl -s 'localhost:9600/_node/stats/events?pretty' | grep "in | awk '{ print $3 }' | sed 's/,//' ;;
events_filtered )
curl -s 'localhost:9600/_node/stats/events?pretty' | grep "filtered | awk '{ print $3 }' | sed 's/,//' ;;
events_out )
curl -s 'localhost:9600/_node/stats/events?pretty' | grep "out | awk '{ print $3 }' | sed 's/,//' ;;
failures )
curl -s 'localhost:9600/_node/stats/reloads?pretty' | grep "failures | awk '{ print $3 }' | sed 's/,//' ;;
esac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant