-
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.
Rebrand cmon to paradrop-agent and update Vagrant env
- Loading branch information
Showing
61 changed files
with
270 additions
and
1,080 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 |
---|---|---|
|
@@ -159,6 +159,7 @@ vendor | |
*.deb | ||
.vagrant* | ||
*.box | ||
paradrop-agent | ||
|
||
# macOS Specific | ||
.DS_Store |
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 |
---|---|---|
|
@@ -70,6 +70,22 @@ rm -rf scap-security-guide-0.1.72* | |
# Install Python Deps | ||
pip3 install -r /paradrop/api/requirements.txt | ||
# Setup paradrop-agent | ||
mkdir -p /etc/paradrop | ||
cat <<'EOF'>/etc/paradrop/paradrop-agent.yaml | ||
api_url: https://localhost:8443/v1/add-host | ||
api_username: [email protected] | ||
api_token: b97a81c5-3c2b-4a96-8881-38af26dc8407 | ||
api_insecure_ssl: true | ||
tags: ["app=paradrop-agent-vagrant","health=https://localhost:8443/v1/health"] | ||
oscap_xccdf_xml: "/usr/share/scap-security-guide/ssg-ubuntu2204-ds.xml" | ||
EOF | ||
cp -f /paradrop/paradrop-agent /usr/bin/ | ||
# timeout 15 paradrop-agent -d | ||
# Restart | ||
systemctl reboot | ||
SHELL | ||
|
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
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
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
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
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
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 |
---|---|---|
@@ -1,27 +1,17 @@ | ||
# cmon | ||
|
||
[![Go Report Card](https://goreportcard.com/badge/github.com/perlogix/cmon)](https://goreportcard.com/report/github.com/perlogix/cmon) | ||
![Go](https://github.com/perlogix/cmon/workflows/Go/badge.svg) | ||
# paradrop-agent | ||
|
||
#### Table of Contents | ||
|
||
1. [Overview](#overview) | ||
- [Example JSON Output](#example-json-output) | ||
2. [Install](#install) | ||
3. [Install Dependencies](#install-dependencies) | ||
- [Server](#server) | ||
- [Client](#client-development) | ||
4. [Getting Started Vagrant](#getting-started-vagrant) | ||
5. [Command-Line Arguments](#command-line-arguments) | ||
6. [Configuration](#configuration) | ||
7. [Vagrant](#vagrant) | ||
8. [Platforms Tested On](#platforms-tested-on) | ||
3. [Getting Started Vagrant](#getting-started-vagrant) | ||
4. [Command-Line Arguments](#command-line-arguments) | ||
5. [Configuration](#configuration) | ||
|
||
## Overview | ||
|
||
NIST Information Security Continuous Monitoring (ISCM) and configuration baseline data collector. | ||
|
||
Great for keeping track of elastic environments, auditing or migrating servers by storing data in ElasticSearch or outputting to STDOUT. | ||
Lightweight configurable agent that collects system-wide data used for paradrop processing. | ||
|
||
Resources gathered if applicable: | ||
|
||
|
@@ -336,108 +326,69 @@ Resources gathered if applicable: | |
} | ||
``` | ||
|
||
Average payload size: `200k` | ||
|
||
ElasticSearch terminology: | ||
|
||
http://elasticsearch:9200/index/type | ||
|
||
Discover terminology: | ||
|
||
http://elasticsearch:9200/servers/environment | ||
|
||
Agent Run Time: | ||
|
||
The agent runs every twenty minutes, and post real-time data to ElasticSearch. | ||
|
||
If you were to delete all hosts in the environment nightly. If the agent is running and the server is up, it will populate the inventory currently with only running hosts and their data. This works very well in elastic compute environments. | ||
|
||
Example with cURL: | ||
|
||
If you want to manually / cron schedule cmon to post to ElasticSearch | ||
|
||
```sh | ||
# HTTP unauth | ||
sudo ./cmon | curl -XPOST -H "Content-Type: application/json" -d @- "http://localhost:9200/servers/_doc/$(hostid)" | ||
|
||
|
||
# Insecure SSL and basic auth | ||
sudo ./cmon | curl -XPOST -k -u admin:admin -H "Content-Type: application/json" -d @- "https://localhost:9200/servers/_doc/$(hostid)" | ||
``` | ||
|
||
## Install | ||
|
||
Install the statically linked Linux binary: | ||
|
||
```sh | ||
curl -OL "https://github.com/perlogix/cmon/releases/download/1.1/cmon" && chmod -f 0755 ./cmon | ||
curl -OL "https://github.com/MetroStar/paradrop/releases/download/0.10/paradrop-agent" && chmod -f 0755 ./paradrop-agent | ||
``` | ||
|
||
Install DEB file: | ||
|
||
```sh | ||
curl -LO $(curl -s https://api.github.com/repos/perlogix/cmon/releases/latest | grep browser_download_url | grep deb | cut -d '"' -f 4) | ||
curl -LO $(curl -s https://api.github.com/repos/MetroStar/paradrop/releases/latest | grep browser_download_url | grep deb | cut -d '"' -f 4) | ||
|
||
dpkg -i ./cmon*.deb | ||
dpkg -i ./paradrop-agent*.deb | ||
``` | ||
|
||
Install RPM file: | ||
|
||
```sh | ||
curl -LO $(curl -s https://api.github.com/repos/perlogix/cmon/releases/latest | grep browser_download_url | grep rpm | cut -d '"' -f 4) | ||
|
||
rpm -i ./cmon*.rpm | ||
``` | ||
|
||
**ElasticSearch Mappings Needed** | ||
|
||
```sh | ||
# Create index | ||
curl -XPUT "http://localhost:9200/servers" | ||
curl -LO $(curl -s https://api.github.com/repos/MetroStar/paradrop/releases/latest | grep browser_download_url | grep rpm | cut -d '"' -f 4) | ||
|
||
# Put mappings to existing index | ||
curl -XPUT "http://localhost:9200/servers/_mapping" -H 'Content-Type: application/json' [email protected] | ||
rpm -i ./paradrop-agent*.rpm | ||
``` | ||
|
||
## Install Dependencies | ||
|
||
### Server | ||
|
||
- ElasticSearch 7.x | ||
- Kibana 7.x | ||
|
||
### Client (development) | ||
### Development | ||
|
||
- Go 1.15>= | ||
- Make | ||
- Docker (Optional) | ||
|
||
Compile from git: | ||
|
||
```sh | ||
git clone https://github.com/MetroStar/paradrop.git | ||
cd paradrop | ||
mkdir -p "$GOPATH"/src/github.com/MetroStar | ||
ln -s "$PWD" "$GOPATH"/src/github.com/MatroStar/ | ||
cd "$GOPATH"/src/github.com/MatroStar/ | ||
make | ||
``` | ||
|
||
To build the binary with Go run the following command: | ||
|
||
```sh | ||
make build | ||
make | ||
``` | ||
|
||
To build the binary with Docker run the following command: | ||
|
||
```sh | ||
make local | ||
make docker | ||
``` | ||
|
||
To build the RPM and Deb packages with Docker run the following command: | ||
|
||
```sh | ||
make VER=1.1 pkgs | ||
make VER=0.10 pkgs | ||
``` | ||
|
||
## Getting Started Vagrant | ||
|
||
```sh | ||
git clone https://github.com/perlogix/cmon.git | ||
|
||
cd cmon | ||
|
||
curl -LO "https://github.com/perlogix/cmon/releases/download/1.1/cmon" | ||
git clone https://github.com/MetroStar/paradrop.git | ||
|
||
vagrant up | ||
``` | ||
|
@@ -447,66 +398,19 @@ vagrant up | |
No flags / arguments will do a one-time run and produce a JSON file in the current path of the binary | ||
|
||
-d, --daemon Run in daemon mode | ||
-c, --config Set configuration path, defaults are ['./', '/opt/perlogix/cmon', '/etc/perlogix/cmon'] | ||
-c, --config Set configuration path, defaults are ['./', '/opt/paradrop', '/etc/paradrop'] | ||
|
||
## Configuration | ||
|
||
Configurations can be written in YAML, JSON or TOML. | ||
|
||
_/etc/perlogix/cmon/cmon.yaml_ | ||
_DEFAULT values if no config is present_ | ||
_/etc/paradrop/paradrop-agent.yaml_ | ||
|
||
```yaml | ||
# ElasticSearch DB | ||
host: localhost | ||
port: 9200 | ||
|
||
# ElasticSearch Index Name | ||
# This can be anything, it could be aws, softlayer, prod, staging | ||
environment: dev | ||
|
||
# Interval of agent runs in seconds | ||
# Default is every twenty minutes | ||
interval: 1200 | ||
|
||
# Username if http-basic plugin is enabled | ||
username: | ||
|
||
# Password if http-basic plugin is enabled | ||
password: | ||
|
||
# https true enables HTTPS instead of HTTP) | ||
https: false | ||
|
||
# Verify SSL for HTTPS endpoints | ||
insecure_ssl: false | ||
|
||
# Public facing asset | ||
public: false | ||
|
||
# Asset type | ||
asset_type: | ||
|
||
# OpenSCAP XCCDF XML file path | ||
oscap_xccdf_xml: /usr/share/scap-security-guide/ssg-ubuntu1804-ds.xml | ||
|
||
# OpenSCAP Profile | ||
oscap_profile: xccdf_org.ssgproject.content_profile_cis | ||
``` | ||
## Vagrant | ||
```sh | ||
git clone https://github.com/perlogix/cmon.git | ||
cd cmon | ||
vagrant up | ||
vagrant ssh | ||
api_url: https://localhost:8443/v1/add-host | ||
api_username: [email protected] | ||
api_token: b97a81c5-3c2b-4a96-8881-38af26dc8407 | ||
api_insecure_ssl: true | ||
tags: ["app=paradrop-agent-vagrant","health=https://localhost:8443/v1/health"] | ||
oscap_xccdf_xml: "/usr/share/scap-security-guide/ssg-ubuntu2204-ds.xml" | ||
``` | ||
|
||
## Platforms Tested On | ||
|
||
- CentOS/RHEL 7 - latest | ||
- Fedora 20 - latest | ||
- Ubuntu 16 - latest | ||
- Mac OS X 16.7.0 - latest | ||
- Windows 10 - latest |
Oops, something went wrong.