{"id":19653561,"url":"https://github.com/sematext/sematext-agent-java","last_synced_at":"2025-08-31T01:34:38.785Z","repository":{"id":33963352,"uuid":"128966071","full_name":"sematext/sematext-agent-java","owner":"sematext","description":"Sematext Monitoring Agent","archived":false,"fork":false,"pushed_at":"2025-05-11T20:17:02.000Z","size":1255,"stargazers_count":23,"open_issues_count":17,"forks_count":9,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-06-03T22:56:42.843Z","etag":null,"topics":["agent","monitoring","performance-metrics","performance-monitoring"],"latest_commit_sha":null,"homepage":"https://sematext.com/spm","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sematext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-10T16:47:36.000Z","updated_at":"2025-05-06T15:47:02.000Z","dependencies_parsed_at":"2023-01-15T03:46:00.938Z","dependency_job_id":"c96067c0-2616-4852-b474-1639180dd67b","html_url":"https://github.com/sematext/sematext-agent-java","commit_stats":null,"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"purl":"pkg:github/sematext/sematext-agent-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sematext%2Fsematext-agent-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sematext%2Fsematext-agent-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sematext%2Fsematext-agent-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sematext%2Fsematext-agent-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sematext","download_url":"https://codeload.github.com/sematext/sematext-agent-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sematext%2Fsematext-agent-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272930003,"owners_count":25017057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","monitoring","performance-metrics","performance-monitoring"],"created_at":"2024-11-11T15:14:30.825Z","updated_at":"2025-08-31T01:34:38.738Z","avatar_url":"https://github.com/sematext.png","language":"Java","readme":"# Sematext App Agent\n\n[![Build Status](https://travis-ci.org/sematext/sematext-agent-java.svg?branch=master)](https://travis-ci.org/sematext/sematext-agent-java)\n\nThis repository contains the source code for Sematext App Agent. Sematext App Agent can be used to collect application\nmetrics from multiple data sources. The data sources and the metrics to be collected can be defined in\n[Metrics Configuration YAML](/docs/metrics-yaml-format.md) files.\nThere are number of built-in integrations available for various applications in\n[sematext-agent-integrations](https://github.com/sematext/sematext-agent-integrations) repo.\n\n## Data Sources\nThe supported data sources are:\n* JMX\n* HTTP REST APIs\n* SQL\n\nSematext App Agent uses Influx Line Protocol to ship the metrics. The metrics collected by the agent can be shipped to\nany Influx Line Protocol compatible endpoints like InfluxDB. In the future, we will add support for other output formats\nlike HTTP, Graphite, etc.\n\n## Configuration\nThe Agent supports a number of [built-in functions](/docs/built-in-functions.md) to process the collected metrics before\nsending them to output. You can also plug-in custom functions.\n\nThe [How-to Guide](/docs/how-to.md) describes how to configure the App Agent in some specific cases.\n\n## Getting Started\n\n### Build\nTo build Sematext App Agent you need:\n\n1) Linux based Operating System\n2) Java 1.6 - 1.8\n3) Maven\n4) Thrift compiler v0.12.0\n    * Steps to install Thrift in Debian based systems\n        ```bash\n          sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config\n          wget https://dlcdn.apache.org/thrift/0.18.1/thrift-0.18.1.tar.gz\n          tar xfz thrift-0.18.1.tar.gz\n          cd thrift-0.18.1 \u0026\u0026 ./configure --enable-libs=no  \u0026\u0026 sudo make install\n        ```\n5) fpm package manager\n    * For steps to install fpm refer [https://fpm.readthedocs.io/en/v1.15.1/installation.html#installing-fpm](https://fpm.readthedocs.io/en/v1.15.1/installation.html#installing-fpm)\n\nAfter cloning the repo, executing `build.sh` will build the packages for multiple Linux distributions.\n\n### Docker\n\nDocker image building for Sematext App Agent is triggered by Maven target:\n\n```bash\n$ sudo mvn clean install dockerfile:build\n```\n\n#### Troubleshooting\n\nwhen 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](https://docs.docker.com/engine/install/ubuntu/) to install the correct one.\n\nIf Docker daemon is listening on TCP socket, you can set `DOCKER_HOST` environment variable and start\nthe build with regular user:\n\n```bash\nDOCKER_HOST=tcp://0.0.0.0:2375 mvn clean install dockerfile:build\n```\n\nOnce the image is built, launching a new container with Sematext App Agent can be achieved with the following command:\n\n```bash\nsudo docker run -i -t --name solr-app-agent -e MONITORING_TOKEN=\u003cmonitoring-token\u003e -e AGENT_TYPE=standalone -e APP_TYPE=solr -e JMX_PARAMS=-Dspm.remote.jmx.url=172.17.0.4:3000 spm-client:version\n```\n\n\n### Set up\nThe packages can be installed using OS specific package manager like dpkg, yum, etc. Once installed a new App can be\nset up by running `setup-spm` command. For example, to set up monitoring for a JVM application in standalone mode, add\n\n```bash\n-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false\n```\nto startup arguments of Java process you wish to monitor. Then you can set up new App by running the following command:\n\n```bash\nsudo bash /opt/spm/bin/setup-spm  \\\n    --monitoring-token \u003cmonitoring-token\u003e   \\\n    --app-type jvm  \\\n    --agent-type standalone \\\n    --jmx-params '-Dspm.remote.jmx.url=localhost:3000'\n```\n\n`\u003cmonitoring-token\u003e` - Monitoring Token should point to Sematext App Token if you are sending metrics to Sematext. App is an entity to\ngroup similar/related metrics. e.g. All Elasticsearch metrics can be grouped under Elasticsearch App. Each App has a unique token.\nFor other Influx endpoints you can specify a hexadecimal value with format `xxxxxxxx--xxxx-xxxx-xxxx-xxxxxxxxxxxx`\ne.g. `d0add28a-0a0f-46b2-9e1e-4928db5200e7`.\n\nVisit [Sematext Documentation](https://sematext.com/docs/agents/sematext-agent/app-agent/) for more info on how to set up and\nconfigure the agent to ship metrics.\n\nBy default, the agent sends the collected metrics to Sematext. You can configure a different Influx compatible destination\nby changing the following properties in `/opt/spm/properties/agent.properties` file:\n\n* `server_base_url` - Base URL of the destination server. e.g. `http://192.168.0.4:8086`\n* `metrics_endpoint` - Path to send the metrics. This will be appended with `server_base_url` to form the complete URL.\n    Default value is `/write?db=metrics`. You can update this property to send metrics to different endpoint\n    or to specify username/password for InfluxDB. e.g. `/write?db=mydb\u0026u=user\u0026p=pass`\n\n## Contributing\nWe welcome bug fixes or feature enhancements to Sematext App Agent. When done working on and testing,\njust submit a pull request to have Sematext review and merge your changes.\n\nTo add support for a new integration refer to [Adding a New Agent Integration](/docs/add-new-integration.md).\n\nTo modify built-in integrations refer to [Modifying Built-in Integrations](/docs/modify-integration.md).\n","funding_links":[],"categories":["Projects"],"sub_categories":["Monitoring"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsematext%2Fsematext-agent-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsematext%2Fsematext-agent-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsematext%2Fsematext-agent-java/lists"}