Giter Club home page Giter Club logo

jmxproxybeat's People

Contributors

ninjasftw avatar radoondas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jmxproxybeat's Issues

Add ability to set bean.hostname

It would be good to be able to set the bean.hostname in the config, otherwise it is 127.0.0.1:8080 (the URL).

Is especially useful if you run jmxproxybeat on many Tomcat hosts and aggregate in a central ES server.

elasticsearch bulk indexing error

Hi,
I am using
Elastic search - 6.2.2
Logstash - 6.2.2
Kibana - 6.2.2.
Installed and made the jmxproxybeat and pushing the details directly to the elasticsearch. Previously I got an error regarding the template upload issue. So I manually uploaded the template using the 'curl'. That issue was resolved. But while trying to push the data, the following error is prompting,
2018/03/22 06:25:45.461945 output.go:174: INFO Template already exists and will not be overwritten.
2018/03/22 06:25:45.462596 bulkapi.go:131: DBG Sending bulk request to http://10.10.114.149:9200/_bulk
2018/03/22 06:25:45.510602 client.go:147: ERR Failed to perform any bulk index operations: 406 Not Acceptable

I read that the issue may be regarding the content type and from elasticsearch 6.X onwards, the content type header is set to true and there is no way to make it disable. When I raised the issue with elasticbeat, they adviced to raise with the beat!
Request you to advice! I am really stuck!
Thanks in advance!
Vishnu

Provide init.d / systemd examples

To ease the demonizing of jmxproxybeat it would be good to add example file for it

jmxproxybeat.initd:

#!/bin/bash
#
# jmxproxybeat          jmxproxy shipper
#
# chkconfig: 2345 98 02
# description: Starts and stops a single jmxproxybeat instance on this system
#

### BEGIN INIT INFO
# Provides:          jmxproxybeat
# Required-Start:    $local_fs $network $syslog
# Required-Stop:     $local_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Jmxproxybeat analyzes Tomcat JMX Servlet metrics.
# Description:       Jmxproxybeat is a shipper for Tomcat Metrics to ElasticSearch.
#					 Please see: https://github.com/radoondas/jmxproxybeat
### END INIT INFO



PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH

[ -f /etc/sysconfig/jmxproxybeat ] && . /etc/sysconfig/jmxproxybeat
pidfile=${PIDFILE-/var/run/jmxproxybeat.pid}
BIN_NAME="jmxproxybeat"
agent=${BEATS_AGENT-/usr/share/jmxproxybeat/${BIN_NAME}}
args="-c /etc/jmxproxybeat/jmxproxybeat.yml -path.home /usr/share/jmxproxybeat -path.data /var/lib/jmxproxybeat -path.logs /var/log/jmxproxybeat"
test_args="-e -configtest"
RETVAL=0

# Source function library.
. /etc/rc.d/init.d/functions

# Determine if we can use the -p option to daemon, killproc, and status.
# RHEL < 5 can't.
if status | grep -q -- '-p' 2>/dev/null; then
    daemonopts="--pidfile $pidfile"
    pidopts="-p $pidfile"
fi

test() {
	$agent $args $test_args
}

start() {
  echo -n $"Starting jmxproxybeat: "
    test
    if [ $? -ne 0 ]; then
      echo
      exit 1
    fi
    daemon $daemonopts "$agent $args &"
    RETVAL=$?
    [ $RETVAL -eq "0" ] && touch /var/lock/subsys/$BIN_NAME
    pid=`ps -A | grep ${BIN_NAME} | cut -d " " -f1`
    if [ -n "$pid" ]; then
        echo $pid > "$pidfile"
    fi
    echo
    return $RETVAL
}

stop() {
    echo -n $"Stopping jmxproxybeat: "
    [ -f /var/lock/subsys/$BIN_NAME ] || return 0
    killproc $agent
    echo
    rm -f $pidfile
    rm -f /var/lock/subsys/$BIN_NAME
    RETVAL=$?
    echo
}

restart() {
	test
	if [ $? -ne 0 ]; then
		return 1
	fi
    stop
    start
}

rh_status() {
    status $pidopts $agent
    RETVAL=$?
    return $RETVAL
}

rh_status_q() {
    rh_status >/dev/null 2>&1
}

case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        restart
    ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        restart
    ;;
    status)
        rh_status
    ;;
    configtest)
        test
    ;;
    *)
        echo $"Usage: $0 {start|stop|status|configtest|restart|condrestart}"
        exit 1
esac

exit $RETVAL

jmxproxybeat.systemd:

[Unit]
Description=JMXProxyBeat Service
After=syslog.target network.target

[Service]
Type=simple
Restart=always
RestartSec=3

User=root
PIDFile=/var/run/jmxproxybeat.pid
ExecStart=/usr/share/jmxproxybeat/jmxproxybeat -c /etc/jmxproxybeat/jmxproxybeat.yml -path.home /usr/share/jmxproxybeat -path.data /var/lib/jmxproxybeat -path.logs /var/log/jmxproxybeat

[Install]
WantedBy=multi-user.target

Can not parse bool value or string value

1. Can not get other types(bool or string) except numbers.

	//TODO: This requires lots of tuning!!
	re = regexp.MustCompile("\\d*(\\.\\d+)?$")
	if matches := re.FindStringSubmatch(responseBody); matches != nil {
		respV, err := strconv.ParseFloat(matches[0], 64)
		//TODO: test for empty string!
		if err != nil {
			return 0.0, err
		}
		respValue = respV
	}

This code only can get numbers, and some times not correct.

2. Get large number not correct. 9223372036854776000 != 9223372036854775807

jxmproxy result

{"@timestamp":"2017-09-19T07:23:02.620Z","bean":{"attribute":"minTime","hostname":"127.0.0.1:8080","name":"Catalina:j2eeType=Servlet,WebModule=//localhost/manager,name=jsp,J2EEApplication=none,J2EEServer=none","value":9223372036854776000},"beat":{"hostname":"my-PC2","name":"my-PC2"},"type":"jmx"}

http response

OK - Attribute get 'Catalina:j2eeType=Servlet,WebModule=//localhost/manager,name=jsp,J2EEApplication=none,J2EEServer=none' - minTime = 9223372036854775807

Thanks

Update Jmxproxybeat to libbeat v6

Update Jmxproxybeat to libbeat v6

To make sure beat is working against Elasticsearch v5 and v6 I have to upgrade jmxproxybeat to Libbeat v 6. Plan to use latest version of Libbeat.

One of the results will be new release and no need to compile this beat any more.

Dashboard for jmxproxybeat

Would be great if you can supply a dashboard / visualizations for jmxproxybeat with the project, like metricbeat modules do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.