Skip to content

Commit 63ab0b0

Browse files
Add initial files for Apache Access Log Detections Mod
1 parent 3746ff9 commit 63ab0b0

File tree

13 files changed

+391
-1
lines changed

13 files changed

+391
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/*.pp linguist-language=HCL
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Powerpipe version (`powerpipe -v`)**
14+
Example: v0.3.0
15+
16+
**Tailpipe version (`tailpipe -v`)**
17+
Example: v0.3.0
18+
19+
**Plugin version (`tailpipe plugin list`)**
20+
Example: v0.5.0
21+
22+
**To reproduce**
23+
Steps to reproduce the behavior (please include relevant code and/or commands).
24+
25+
**Expected behavior**
26+
A clear and concise description of what you expected to happen.
27+
28+
**Additional context**
29+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions
4+
url: https://turbot.com/community/join
5+
about: GitHub issues in this repository are only intended for bug reports and feature requests. Other issues will be closed. Please ask and answer questions through the Turbot Slack community.
6+
- name: Powerpipe CLI Bug Reports and Feature Requests
7+
url: https://github.com/turbot/powerpipe/issues/new/choose
8+
about: Powerpipe CLI has its own codebase. Bug reports and feature requests for those pieces of functionality should be directed to that repository.
9+
- name: Tailpipe CLI Bug Reports and Feature Requests
10+
url: https://github.com/turbot/tailpipe/issues/new/choose
11+
about: Tailpipe CLI has its own codebase. Bug reports and feature requests for those pieces of functionality should be directed to that repository.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Checklist
2+
- [ ] Issue(s) linked

.github/workflows/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Stale Issues and PRs
2+
on:
3+
schedule:
4+
- cron: "30 23 * * *"
5+
workflow_dispatch:
6+
inputs:
7+
dryRun:
8+
description: Set to true for a dry run
9+
required: false
10+
default: "false"
11+
type: string
12+
13+
jobs:
14+
stale_workflow:
15+
uses: turbot/steampipe-workflows/.github/workflows/stale.yml@main
16+
with:
17+
dryRun: ${{ github.event.inputs.dryRun }}

.github/workflows/sync-labels.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Sync Labels
2+
on:
3+
schedule:
4+
- cron: "30 22 * * 1"
5+
workflow_dispatch:
6+
7+
jobs:
8+
sync_labels_workflow:
9+
uses: turbot/steampipe-workflows/.github/workflows/sync-labels.yml@main

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Swap files
9+
*.swp
10+
11+
# Ignore Apple custom attributes file
12+
.DS_Store
13+
14+
# Powerpipe variable files
15+
*.ppvars
16+
*.auto.ppvars
17+
18+
# Ignore DuckDB files
19+
*.db

README.md

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,129 @@
1-
# tailpipe-mod-apache-access-log-detections
1+
# Apache Access Log Detections Mod for Powerpipe
2+
3+
View dashboards, run detections and scan for anomalies across your Apache access logs.
4+
5+
<!--
6+
TODO: Insert images
7+
-->
8+
9+
## Documentation
10+
11+
- **[Dashboards →](https://hub.powerpipe.io/mods/turbot/tailpipe-mod-apache-access-log-detections/dashboards)**
12+
- **[Benchmarks and detections →](https://hub.powerpipe.io/mods/turbot/tailpipe-mod-apache-access-log-detections/benchmarks)**
13+
14+
## Getting Started
15+
16+
### Installation
17+
18+
Install Powerpipe (https://powerpipe.io/downloads), or use Brew:
19+
20+
```sh
21+
brew install turbot/tap/powerpipe
22+
```
23+
24+
Install the mod:
25+
26+
```sh
27+
mkdir dashboards
28+
cd dashboards
29+
powerpipe mod install github.com/turbot/tailpipe-mod-apache-access-log-detections
30+
```
31+
32+
This mod also requires [Tailpipe](https://tailpipe.io) with the [Apache plugin](https://hub.tailpipe.io/plugins/turbot/apache).
33+
34+
Install Tailpipe (https://tailpipe.io/downloads), or use Brew:
35+
36+
```sh
37+
brew install turbot/tap/tailpipe
38+
tailpipe plugin install apache
39+
```
40+
41+
### Configuration
42+
43+
Configure your log source:
44+
45+
```sh
46+
vi ~/.tailpipe/config/apache.tpc
47+
```
48+
49+
```hcl
50+
partition "apache_access_log" "test" {
51+
source "file" {
52+
paths = ["/Users/mscott/apache_access_log"]
53+
file_layout = "%{DATA}.log"
54+
}
55+
}
56+
```
57+
58+
### Log Collection
59+
60+
Collect logs:
61+
62+
```sh
63+
tailpipe collect apache_access_log
64+
```
65+
66+
When running `tailpipe collect` for the first time, logs from the last 7 days are collected. Subsequent `tailpipe collect` runs will collect logs from the last collection date.
67+
68+
You can override the default behaviour by specifying `--from`:
69+
70+
```sh
71+
tailpipe collect apache_access_log --from 2025-01-01
72+
```
73+
74+
You can also use relative times. For instance, to collect logs from the last 60 days:
75+
76+
```sh
77+
tailpipe collect apache_access_log --from T-60d
78+
```
79+
80+
Please note that if you specify a date in `--from`, Tailpipe will delete any collected data for that partition starting from that date to help avoid gaps in the data.
81+
82+
For additional examples on using `tailpipe collect`, please see [tailpipe collect](https://tailpipe.io/docs/reference/cli/collect) reference documentation.
83+
84+
### Browsing Dashboards
85+
86+
Start the dashboard server:
87+
88+
```sh
89+
powerpipe server
90+
```
91+
92+
Browse and view your dashboards at **http://localhost:9033**.
93+
94+
### Running Benchmarks in Your Terminal
95+
96+
Instead of running benchmarks in a dashboard, you can also run them within your
97+
terminal with the `powerpipe benchmark` command:
98+
99+
List available benchmarks:
100+
101+
```sh
102+
powerpipe benchmark list
103+
```
104+
105+
<!-- TODO: add a benchmark name and uncomment
106+
Run a benchmark:
107+
108+
```sh
109+
powerpipe benchmark run apache_access_log_detections.benchmark.
110+
```
111+
-->
112+
Different output formats are also available, for more information please see
113+
[Output Formats](https://powerpipe.io/docs/reference/cli/benchmark#output-formats).
114+
115+
## Open Source & Contributing
116+
117+
This repository is published under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!
118+
119+
[Tailpipe](https://tailpipe.io) and [Powerpipe](https://powerpipe.io) are products produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). They are distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).
120+
121+
## Get Involved
122+
123+
**[Join #tailpipe and #powerpipe on Slack →](https://turbot.com/community/join)**
124+
125+
Want to help but don't know where to start? Pick up one of the `help wanted` issues:
126+
127+
- [Powerpipe](https://github.com/turbot/powerpipe/labels/help%20wanted)
128+
- [Tailpipe](https://github.com/turbot/tailpipe/labels/help%20wanted)
129+
- [Apache Access Log Detections Mod](https://github.com/turbot/tailpipe-mod-apache-access-log-detections/labels/help%20wanted)

docs/index.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Apache Access Log Detections Mod
2+
3+
View dashboards, run reports, and scan for anomalies across your Apache Access logs.
4+
5+
## Documentation
6+
7+
- **[Dashboards →](https://hub.powerpipe.io/mods/turbot/tailpipe-mod-apache-access-log-detections/dashboards)**
8+
- **[Benchmarks and detections →](https://hub.powerpipe.io/mods/turbot/tailpipe-mod-apache-access-log-detections/benchmarks)**
9+
10+
## Getting Started
11+
12+
### Installation
13+
14+
Install Powerpipe (https://powerpipe.io/downloads), or use Brew:
15+
16+
```sh
17+
brew install turbot/tap/powerpipe
18+
```
19+
20+
Install the mod:
21+
22+
```sh
23+
mkdir dashboards
24+
cd dashboards
25+
powerpipe mod install github.com/turbot/tailpipe-mod-apache-access-log-detections
26+
```
27+
28+
This mod also requires [Tailpipe](https://tailpipe.io) with the [Apache plugin](https://hub.tailpipe.io/plugins/turbot/apache).
29+
30+
Install Tailpipe (https://tailpipe.io/downloads), or use Brew:
31+
32+
```sh
33+
brew install turbot/tap/tailpipe
34+
tailpipe plugin install apache
35+
```
36+
37+
### Configuration
38+
39+
Configure your log source:
40+
41+
```sh
42+
vi ~/.tailpipe/config/apache.tpc
43+
```
44+
45+
```hcl
46+
partition "apache_access_log" "test" {
47+
source "file" {
48+
paths = ["/Users/mscott/apache_access_log"]
49+
file_layout = "%{DATA}.log"
50+
}
51+
}
52+
```
53+
54+
### Log Collection
55+
56+
Collect logs:
57+
58+
```sh
59+
tailpipe collect apache_access_log
60+
```
61+
62+
When running `tailpipe collect` for the first time, logs from the last 7 days are collected. Subsequent `tailpipe collect` runs will collect logs from the last collection date.
63+
64+
You can override the default behaviour by specifying `--from`:
65+
66+
```sh
67+
tailpipe collect apache_access_log --from 2025-01-01
68+
```
69+
70+
You can also use relative times. For instance, to collect logs from the last 60 days:
71+
72+
```sh
73+
tailpipe collect apache_access_log --from T-60d
74+
```
75+
76+
Please note that if you specify a date in `--from`, Tailpipe will delete any collected data for that partition starting from that date to help avoid gaps in the data.
77+
78+
For additional examples on using `tailpipe collect`, please see [tailpipe collect](https://tailpipe.io/docs/reference/cli/collect) reference documentation.
79+
80+
### Browsing Dashboards
81+
82+
Start the dashboard server:
83+
84+
```sh
85+
powerpipe server
86+
```
87+
88+
Browse and view your dashboards at **http://localhost:9033**.
89+
90+
### Running Benchmarks in Your Terminal
91+
92+
Instead of running benchmarks in a dashboard, you can also run them within your
93+
terminal with the `powerpipe benchmark` command:
94+
95+
List available benchmarks:
96+
97+
```sh
98+
powerpipe benchmark list
99+
```
100+
101+
<!-- TODO: add a benchmark name and uncomment
102+
Run a benchmark:
103+
104+
```sh
105+
powerpipe benchmark run apache_access_log_detections.benchmark.
106+
```
107+
-->
108+
109+
Different output formats are also available, for more information please see
110+
[Output Formats](https://powerpipe.io/docs/reference/cli/benchmark#output-formats).
111+
112+
## Open Source & Contributing
113+
114+
This repository is published under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!
115+
116+
[Steampipe](https://steampipe.io) and [Powerpipe](https://powerpipe.io) are products produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). They are distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).
117+
118+
## Get Involved
119+
120+
**[Join #powerpipe on Slack →](https://turbot.com/community/join)**
121+
122+
Want to help but don't know where to start? Pick up one of the `help wanted` issues:
123+
124+
- [Powerpipe](https://github.com/turbot/powerpipe/labels/help%20wanted)
125+
- [Apache Access Log Detections Mod](https://github.com/turbot/tailpipe-mod-apache-access-log-detections/labels/help%20wanted)

0 commit comments

Comments
 (0)