• Stars
    star
    21
  • Rank 1,048,645 (Top 22 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sematext Monitoring Agent

Sematext App Agent

Build Status

This repository contains the source code for Sematext App Agent. Sematext App Agent can be used to collect application metrics from multiple data sources. The data sources and the metrics to be collected can be defined in Metrics Configuration YAML files. There are number of built-in integrations available for various applications in sematext-agent-integrations repo.

Data Sources

The supported data sources are:

  • JMX
  • HTTP REST APIs
  • SQL

Sematext App Agent uses Influx Line Protocol to ship the metrics. The metrics collected by the agent can be shipped to any Influx Line Protocol compatible endpoints like InfluxDB. In the future, we will add support for other output formats like HTTP, Graphite, etc.

Configuration

The Agent supports a number of built-in functions to process the collected metrics before sending them to output. You can also plug-in custom functions.

The How-to Guide describes how to configure the App Agent in some specific cases.

Getting Started

Build

To build Sematext App Agent you need:

  1. Linux based Operating System
  2. Java 1.6 - 1.8
  3. Maven
  4. Thrift compiler v0.12.0
    • Steps to install Thrift in Debian based systems
        sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config
        wget https://dlcdn.apache.org/thrift/0.18.1/thrift-0.18.1.tar.gz
        tar xfz thrift-0.18.1.tar.gz
        cd thrift-0.18.1 && ./configure --enable-libs=no  && sudo make install
  5. fpm package manager

After cloning the repo, executing build.sh will build the packages for multiple Linux distributions.

Docker

Docker image building for Sematext App Agent is triggered by Maven target:

$ sudo mvn clean install dockerfile:build

Troubleshooting

when building the image, if software-properties-common package fails, could be because the Docker installation is snap instead of apt version. To install the apt version, follow this to install the correct one.

If Docker daemon is listening on TCP socket, you can set DOCKER_HOST environment variable and start the build with regular user:

DOCKER_HOST=tcp://0.0.0.0:2375 mvn clean install dockerfile:build

Once the image is built, launching a new container with Sematext App Agent can be achieved with the following command:

sudo docker run -i -t --name solr-app-agent -e MONITORING_TOKEN=<monitoring-token> -e AGENT_TYPE=standalone -e APP_TYPE=solr -e JMX_PARAMS=-Dspm.remote.jmx.url=172.17.0.4:3000 spm-client:version

Set up

The packages can be installed using OS specific package manager like dpkg, yum, etc. Once installed a new App can be set up by running setup-spm command. For example, to set up monitoring for a JVM application in standalone mode, add

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

to startup arguments of Java process you wish to monitor. Then you can set up new App by running the following command:

sudo bash /opt/spm/bin/setup-spm  \
    --monitoring-token <monitoring-token>   \
    --app-type jvm  \
    --agent-type standalone \
    --jmx-params '-Dspm.remote.jmx.url=localhost:3000'

<monitoring-token> - Monitoring Token should point to Sematext App Token if you are sending metrics to Sematext. App is an entity to group similar/related metrics. e.g. All Elasticsearch metrics can be grouped under Elasticsearch App. Each App has a unique token. For other Influx endpoints you can specify a hexadecimal value with format xxxxxxxx--xxxx-xxxx-xxxx-xxxxxxxxxxxx e.g. d0add28a-0a0f-46b2-9e1e-4928db5200e7.

Visit Sematext Documentation for more info on how to set up and configure the agent to ship metrics.

By default, the agent sends the collected metrics to Sematext. You can configure a different Influx compatible destination by changing the following properties in /opt/spm/properties/agent.properties file:

  • server_base_url - Base URL of the destination server. e.g. http://192.168.0.4:8086
  • metrics_endpoint - Path to send the metrics. This will be appended with server_base_url to form the complete URL. Default value is /write?db=metrics. You can update this property to send metrics to different endpoint or to specify username/password for InfluxDB. e.g. /write?db=mydb&u=user&p=pass

Contributing

We welcome bug fixes or feature enhancements to Sematext App Agent. When done working on and testing, just submit a pull request to have Sematext review and merge your changes.

To add support for a new integration refer to Adding a New Agent Integration.

To modify built-in integrations refer to Modifying Built-in Integrations.

More Repositories

1

logagent-js

Extensible log shipper with input/output plugins, buffering, parsing, data masking, and small memory/CPU footprint
JavaScript
389
star
2

sematext-agent-docker

Sematext Docker Agent - host + container metrics, logs & event collector
JavaScript
204
star
3

cheatsheets

200
star
4

sematable

ReactJS / Redux Data Table
JavaScript
160
star
5

oxdpus

A toy tool that leverages the super powers of XDP to bring in-kernel IP filtering
Go
95
star
6

spm-agent-nodejs

NodeJS Monitoring Agent
JavaScript
60
star
7

solr-autocomplete

Solr AutoComplete implementation
Java
60
star
8

uprobe-http-tracer

uprobe-based HTTP tracer for Go binaries
Go
60
star
9

solr-redis

Solr Redis Extensions
Java
52
star
10

spm-agent-docker

SPM Docker Monitoring Agent - container + host metrics & events + logs collector
JavaScript
23
star
11

sematext-logsene-android

Sematext Logs Client Library for Android
Java
22
star
12

query-segmenter

Solr Query Segmenter for structuring unstructured queries
Java
21
star
13

jmxc

Simple JMX Console
Java
17
star
14

sematext-agent-express

Express.js Monitoring and Logging Agent by Sematext
JavaScript
16
star
15

solr-researcher

Solr SearchComponent for altering and re-executing queries that product poor results
Java
14
star
16

browser-sdk

Repository for the web browser SDK used for Sematext Experience.
JavaScript
14
star
17

winston-logsene

Winston Transport for Logsene
JavaScript
14
star
18

sematext-agent-integrations

Core & Community developed monitoring integrations for Sematext monitoring agent
12
star
19

elasticsearch-field-stats

A replacement for Field Stats functionality which was removed from Elasticsearch
Java
11
star
20

blog-java_logging

Code examples for Java logging blog post
Java
11
star
21

berlin-buzzwords-samples

Code and dataset samples for our Berlin Buzzwords presentations given by Sematext engineers
Shell
11
star
22

logsene-cli

Logsene Command-line Interface
JavaScript
10
star
23

logsene-js

Log shipping library for sending logs to Sematext from JavaScript apps
JavaScript
10
star
24

activate

Examples for the Activate conference
Python
10
star
25

velocity

code samples and configs for our O'Reilly Velocity presentations
Shell
9
star
26

HBaseMetricsContext

Java
9
star
27

spm-agent

SPM Agent Framework written in NodeJS
JavaScript
9
star
28

related-searches

Related Searches - get queries related or similar to a given query
Java
8
star
29

spm-metrics-js

Sematext Agent for Custom Metrics
JavaScript
8
star
30

kite-morphlines-elasticsearch

Kite SDK Morphines for Elasticsearch
Java
8
star
31

spm-agent-mongodb

Sematext Agent for monitoring MongoDB
JavaScript
8
star
32

vercel-integrations

Forward logs and metrics from Vercel to Sematext for easy troubleshooting and debugging.
JavaScript
8
star
33

sematext-logsene-ios

Sematext Logs Client Library for iOS
Swift
7
star
34

spm-tracing-api

Java Tracing API for Performance Monitoring and Transaction Tracing via SPM
Java
6
star
35

opentracing-materials

Collection of OpenTracing examples and scenarios for different languages / frameworks
Java
6
star
36

sematext-api-client-go

Sematext API Client
Go
5
star
37

docker-spm-client

Docker Image with Sematext Agent for monitoring Docker Containers & Applications inside them
Shell
5
star
38

logsene-aws-lambda-cloudwatch

AWS Lambda script to send CloudWatch logs to Logsene
JavaScript
5
star
39

solr-diagnostics

Gathers info from Solr: logs, configs, etc. Useful for remote debugging
Java
5
star
40

lucene-revolution-samples

Code and dataset samples for our Lucene Revolution presentations given by Sematext engineers
Ruby
5
star
41

solr-reindexer

Reindexes documents from a Solr query to a destination collection
Java
5
star
42

sematext-metrics-reporter

Coda Metrics SPM Reporter
Java
5
star
43

elasticsearch-intro

Some information to get you started with Elasticsearch
Shell
4
star
44

meetups

Commands and sample data for various meetups
Shell
3
star
45

cloudwatch-sematext-aws-lambda-log-shipper

Code sample for tutorial about creating a centralized logging system for AWS Lambda with Sematext Logsene.
JavaScript
3
star
46

terraform-provider-sematext

Sematext Terraform Provider
Go
3
star
47

sematext-api-client-javascript

Sematext API Client for Node.js
JavaScript
3
star
48

sematext-api-client-java

Sematext API Client for Java
Java
2
star
49

kamon-spm-example

Example Akka App and Config for Akka and Play monitoring with Kamon and SPM
Scala
2
star
50

terraform-examples

2
star
51

spm-agent-os

Sematext Agent for OS metrics written in Node.js
JavaScript
2
star
52

docs

Sematext Documentation
HTML
2
star
53

sematext-api-client-rust

Sematext API Client for Rust
Rust
2
star
54

logsene-aws-lambda-s3

AWS Lambda script to send S3 logs to Logsene
Python
1
star
55

logagent-input-kafka

Logagent plugin to read messages from Apache Kafka
JavaScript
1
star
56

sematext-metrics-gem

Ruby Gem for pushing Custom Metrics into SPM
Ruby
1
star
57

sematext-api-client-php

Sematext API Client for PHP
PHP
1
star
58

ansible-config-sematext

Ansible Config Role for Sematext monitoring agents
1
star
59

imap-email-extractor

Java
1
star
60

BasecampMigrator

1
star
61

sematext-metrics

Java Library for sending Custom Metrics to SPM
Java
1
star
62

sematext-api-client-python

Sematext API Client for Python
Python
1
star
63

sematext-api-client-ruby

Sematext API Client for Ruby
Ruby
1
star
64

webcampzagreb

WebCamp Zagreb related materials
1
star