Skip to content

Commit 37197e5

Browse files
authored
Update timechart in SPL/PPL cheat sheet (opensearch-project#4382)
* Update timechart in SPL/PPL cheat sheet Signed-off-by: Peng Huo <penghuo@gmail.com> * Update Signed-off-by: Peng Huo <penghuo@gmail.com> --------- Signed-off-by: Peng Huo <penghuo@gmail.com>
1 parent a2159be commit 37197e5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/user/ppl/reference/splunk_to_ppl_cheat_sheet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ This table provides a mapping between Splunk SPL commands and their OpenSearch P
5555
- PPL: ```source=`*` error failed status=500```
5656

5757
**Aggregation:**
58-
- Splunk: `... | stats count BY host, status | sort -count`
58+
- Splunk: `... | stats count by host, status | sort -count`
5959
- PPL: `... | stats count() by host, status | sort - count`
6060

6161
**Time-based query:**
62-
- Splunk: `... earliest=-7d | timechart span=1h count BY host`
63-
- PPL: `... | where timestamp >= date_sub(now(), INTERVAL 1 DAY) | stats count() by span(timestamp, 1h), host`
62+
- Splunk: `... | timechart span=1h count by host`
63+
- PPL: `... | timechart span=1h count by host`
6464

6565
**Complex calculation:**
66-
- Splunk: `... | eval mb=bytes/1024/1024 | stats avg(mb) AS avg_mb BY host | where avg_mb > 100`
66+
- Splunk: `... | eval mb=bytes/1024/1024 | stats avg(mb) AS avg_mb by host | where avg_mb > 100`
6767
- PPL: `... | eval mb=bytes/1024/1024 | stats avg(mb) as avg_mb by host | where avg_mb > 100`
6868

6969
## Basic Search Syntax

0 commit comments

Comments
 (0)