-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f2ff076
Showing
21 changed files
with
6,454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.classpath | ||
.project | ||
.settings/ | ||
target/ | ||
dependency-reduced-pom.xml | ||
node_modules | ||
node | ||
build | ||
cache | ||
build.config.js.sample | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
sudo: required | ||
dist: trusty | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
addons: | ||
apt: | ||
packages: | ||
- rpm | ||
before_deploy: | ||
- mvn jdeb:jdeb && export RELEASE_DEB_FILE=$(ls target/*.deb) | ||
- mvn rpm:rpm && export RELEASE_RPM_FILE=$(find target/ -name '*.rpm' | tail -1) | ||
- rm -f target/original-*.jar | ||
- export RELEASE_PKG_FILE=$(ls target/*.jar) | ||
- echo "Deploying release to GitHub releases" | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: <enter your encrypted GitHub access token> | ||
file: | ||
- "${RELEASE_PKG_FILE}" | ||
- "${RELEASE_DEB_FILE}" | ||
- "${RELEASE_RPM_FILE}" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
jdk: oraclejdk8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Getting started with your new Graylog plugin | ||
============================================ | ||
|
||
Welcome to your new Graylog plugin! | ||
|
||
Please refer to http://docs.graylog.org/en/latest/pages/plugins.html for documentation on how to write | ||
plugins for Graylog. | ||
|
||
Travis CI | ||
--------- | ||
|
||
There is a `.travis.yml` template in this project which is prepared to automatically | ||
deploy the plugin artifacts (JAR, DEB, RPM) to GitHub releases. | ||
|
||
You just have to add your encrypted GitHub access token to the `.travis.yml`. | ||
The token can be generated in your [GitHub personal access token settings](https://github.com/settings/tokens). | ||
|
||
Before Travis CI works, you have to enable it. Install the Travis CI command line | ||
application and execute `travis enable`. | ||
|
||
To encrypt your GitHub access token you can use `travis encrypt`. | ||
|
||
Alternatively you can use `travis setup -f releases` to automatically create a GitHub | ||
access token and add it to the `.travis.yml` file. **Attention:** doing this | ||
will replace some parts of the `.travis.yml` file and you have to restore previous | ||
settings. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# JSON Remote Polling Input Plugin for Graylog | ||
|
||
<!-- [![Build Status](https://travis-ci.org/https://github.com/smxsm/graylog-json-remote-poll.svg?branch=master)](https://travis-ci.org/https://github.com/smxsm/graylog-json-remote-poll) --> | ||
|
||
This is a Graylog Input plugin that enables you to poll remote URIs which should return single GELF messages as JSON output. | ||
It supports Basic Auth and Proxies. | ||
All the fields in the message will be stored, here is an example message which contains some MySQL status info: | ||
|
||
```json | ||
{ | ||
"version": "1.0", | ||
"host": "mydomain", | ||
"short_message": "MySQL Status", | ||
"timestamp": 1543155515, | ||
"level": 1, | ||
"_Aborted_clients_per_second": 0, | ||
"_Aborted_connects_per_second": 0, | ||
"_Com_admin_commands_per_second": 0, | ||
"_Com_change_db_per_second": 0, | ||
"_Com_commit_per_second": 0, | ||
"_Com_delete_per_second": 0, | ||
"_Com_delete_multi_per_second": 0, | ||
"_Com_insert_per_second": 0, | ||
"_Com_insert_select_per_second": 0, | ||
"_Com_replace_per_second": 0, | ||
"_Com_select_per_second": 0, | ||
"_Com_set_option_per_second": 0, | ||
"_Com_show_collations_per_second": 0, | ||
"_Com_update_per_second": 0, | ||
"_Connections_per_second": 0, | ||
"_Created_tmp_disk_tables_per_second": 0, | ||
"_Created_tmp_files_per_second": 0, | ||
"_Created_tmp_tables_per_second": 0, | ||
"_Delayed_errors_per_second": 0, | ||
"_Delayed_insert_threads_per_second": 0, | ||
"_Delayed_writes_per_second": 0, | ||
"_Slow_queries_per_second": 0, | ||
"_Table_locks_immediate_per_second": 0, | ||
"_Table_locks_waited_per_second": 0, | ||
"_Innodb_buffer_pool_read_requests": 4319683, | ||
"_Innodb_buffer_pool_reads": 1163, | ||
"_Innodb_buffer_pool_write_requests": 133618, | ||
"_Max_used_connections": 23, | ||
"_Open_files": 2, | ||
"_Open_streams": 0, | ||
"_Open_table_definitions": 291, | ||
"_Open_tables": 416, | ||
"_Qcache_free_blocks": 1, | ||
"_Qcache_free_memory": 16760152, | ||
"_Threads_cached": 7, | ||
"_Threads_connected": 3, | ||
"_Threads_created": 82, | ||
"_Threads_running": 1 | ||
} | ||
``` | ||
|
||
**Required Graylog version:** 2.0 and later | ||
|
||
Installation | ||
------------ | ||
|
||
[Download the plugin](https://github.com/https://github.com/smxsm/graylog-json-remote-poll/releases) | ||
and place the `.jar` file in your Graylog plugin directory. The plugin directory | ||
is the `plugins/` folder relative from your `graylog-server` directory by default | ||
and can be configured in your `graylog.conf` file. | ||
|
||
Restart `graylog-server` and you are done. | ||
|
||
Usage | ||
----- | ||
|
||
After the plugin is installed, go to "System / Inputs" and launch a new _"JSON Remote Polling"_ input. | ||
Enter the URL, set timeout, username, password etc. fields and start the input. | ||
|
||
![JRP Input](JRP_Input.png) | ||
|
||
Getting started | ||
--------------- | ||
|
||
This project is using Maven 3 and requires Java 8 or higher. | ||
|
||
* Clone this repository. | ||
* Run `mvn package` to build a JAR file. | ||
* Optional: Run `mvn jdeb:jdeb` and `mvn rpm:rpm` to create a DEB and RPM package respectively. | ||
* Copy generated JAR file in target directory to your Graylog plugin directory. | ||
* Restart the Graylog. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
// Make sure that this is the correct path to the web interface part of the Graylog server repository. | ||
web_src_path: path.resolve(__dirname, '../graylog2-server', 'graylog2-web-interface'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "JsonRemotePoll", | ||
"version": "1.0.0-SNAPSHOT", | ||
"description": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/smxsm/graylog-json-remote-poll" | ||
}, | ||
"scripts": { | ||
"build": "webpack", | ||
"lint": "eslint -c .eslintrc src/**/*", | ||
"test": "jest" | ||
}, | ||
"keywords": [ | ||
"graylog", | ||
"JSON", | ||
"Polling", | ||
"HTTP", | ||
"Input" | ||
], | ||
"author": "Stefan Moises <moises@shoptimax.de>", | ||
"license": "MIT", | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"graylog-web-plugin": "file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin" | ||
} | ||
} |
Oops, something went wrong.