Skip to content

Commit

Permalink
Merge pull request #51 from pafernanr/devel
Browse files Browse the repository at this point in the history
Multiple enhancements
  • Loading branch information
pafernanr authored Jun 20, 2024
2 parents 511b6ac + 9944625 commit 6fcb6aa
Show file tree
Hide file tree
Showing 117 changed files with 24,899 additions and 23,063 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SarCharts gets [sysstat](https://sysstat.github.io/) files from provided `sarfil

### Usage
~~~
usage: sarcharts [-h] [-d {D,I,W,E}] [-e EVENTFILE] [-f FROMDATE] [-m METRICFILE] [-o OUTPUTPATH] [-t TODATE] [-q] [sarfilespaths ...]
usage: sarcharts [-h] [-c CONFIGFILE] [-d {D,I,W,E}] [-e EVENTFILE] [-f FROMDATE] [-m METRICFILE] [-o OUTPUTPATH] [-t TODATE] [-q] [sarfilespaths ...]
SarCharts gets "sysstat" files from provided `sarfilespaths` and generates dynamic HTML Charts.
Expand All @@ -20,6 +20,8 @@ positional arguments:
optional arguments:
-h, --help show this help message and exit
-c CONFIGFILE, --configfile CONFIGFILE
Use alternative config file. Default `~/.sarcharts.cfg`.
-d {D,I,W,E}, --debug {D,I,W,E}
Set debug level. Default `W`.
-e EVENTFILE, --eventfile EVENTFILE
Expand All @@ -37,5 +39,5 @@ optional arguments:

| Example Chart |
| --- |
| ![](/doc/sarcharts.png) |
| ![](/docs/sarcharts.png) |

6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SarCharts gets [sysstat](https://sysstat.github.io/) files from provided `sarfil

### Usage
~~~
usage: sarcharts [-h] [-d {D,I,W,E}] [-e EVENTFILE] [-f FROMDATE] [-m METRICFILE] [-o OUTPUTPATH] [-t TODATE] [-q] [sarfilespaths ...]
usage: sarcharts [-h] [-c CONFIGFILE] [-d {D,I,W,E}] [-e EVENTFILE] [-f FROMDATE] [-m METRICFILE] [-o OUTPUTPATH] [-t TODATE] [-q] [sarfilespaths ...]
SarCharts gets "sysstat" files from provided `sarfilespaths` and generates dynamic HTML Charts.
Expand All @@ -20,6 +20,8 @@ positional arguments:
optional arguments:
-h, --help show this help message and exit
-c CONFIGFILE, --configfile CONFIGFILE
Use alternative config file. Default `~/.sarcharts.cfg`.
-d {D,I,W,E}, --debug {D,I,W,E}
Set debug level. Default `W`.
-e EVENTFILE, --eventfile EVENTFILE
Expand All @@ -37,5 +39,5 @@ optional arguments:

| Example Chart |
| --- |
| ![](/doc/sarcharts.png) |
| ![](/docs/sarcharts.png) |

6 changes: 6 additions & 0 deletions docs/demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### how to regenerate demo
~~~
cd demo
rm -rf sarcharts/
sarcharts sa08 -m metrics.csv -e events.csv -f "2024-06-08 14" -t "2024-06-08 21"
~~~
4 changes: 4 additions & 0 deletions docs/demo/events.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# date,hostname,eventname,eventdescription
2024-06-08T19:00:43+02:00,pablolaptop.pegaso.lan,Backup Started,"Server Backup was started at this time.<div id=eventdemo>\rEvents can use HTML tags. <font style='color: red'>Use it with caution!</font>\rCheck used CSV files here:<ul><li><a href='../events.csv'>events.csv</a></li><li><a href='../metrics.csv'>metrics.csv</a></li></ul></div>"
2024-06-08 19:20:00,pablolaptop.pegaso.lan,OOM,"Out Of Memory detected.<div id=eventdemo>\r(Multiple <b>hostname</b>/s, <b>eventname</b>/s and <b>date formats</b> are supported on same CSV file:<ul><li>%Y-%m-%d %H:%M:%S</li><li>%Y-%m-%dT%H:%M:%S%z</li><li>%Y-%m-%dT%H:%M:%S</li><li>%Y-%m-%d %H:%M</li><li>%Y-%m-%d %H</li><li>%Y-%m-%d</li></ul>\rCheck used CSV files here:<ul><li><a href='../events.csv'>events.csv</a></li><li><a href='../metrics.csv'>metrics.csv</a></li></ul></div>"
2024-06-08 19:06,pablolaptop.pegaso.lan,DB Conn,"Database connections is greater than 120.<div id=eventdemo>\rYou can also add additional metrics using <b>-m custommetrics.csv</b> parameter.\rCheck used CSV files here:<ul><li><a href='../events.csv'>events.csv</a></li><li><a href='../metrics.csv'>metrics.csv</a></li></ul></div>"
43 changes: 43 additions & 0 deletions docs/demo/metrics.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# date,hostname,DBconnections,HTTPrequests
2024-06-08 14:00:01,pablolaptop.pegaso.lan,24,440
2024-06-08 14:10:01,pablolaptop.pegaso.lan,29,440
2024-06-08 14:20:02,pablolaptop.pegaso.lan,20,440
2024-06-08 14:30:03,pablolaptop.pegaso.lan,15,430
2024-06-08 14:40:03,pablolaptop.pegaso.lan,29,440
2024-06-08 14:50:04,pablolaptop.pegaso.lan,30,450
2024-06-08 15:00:04,pablolaptop.pegaso.lan,36,450
2024-06-08 15:10:05,pablolaptop.pegaso.lan,35,450
2024-06-08 15:20:06,pablolaptop.pegaso.lan,42,460
2024-06-08 15:30:06,pablolaptop.pegaso.lan,47,460
2024-06-08 15:40:07,pablolaptop.pegaso.lan,44,460
2024-06-08 15:50:07,pablolaptop.pegaso.lan,37,440
2024-06-08 16:00:08,pablolaptop.pegaso.lan,32,442
2024-06-08 16:10:09,pablolaptop.pegaso.lan,37,440
2024-06-08 16:20:09,pablolaptop.pegaso.lan,36,440
2024-06-08 16:30:00,pablolaptop.pegaso.lan,35,440
2024-06-08 16:40:00,pablolaptop.pegaso.lan,34,440
2024-06-08 16:50:01,pablolaptop.pegaso.lan,42,450
2024-06-08 17:00:02,pablolaptop.pegaso.lan,96,490
2024-06-08 17:10:01,pablolaptop.pegaso.lan,155,781
2024-06-08 17:20:03,pablolaptop.pegaso.lan,187,790
2024-06-08 17:30:04,pablolaptop.pegaso.lan,0,1000
2024-06-08 17:40:04,pablolaptop.pegaso.lan,100,800
2024-06-08 17:50:05,pablolaptop.pegaso.lan,98,760
2024-06-08 18:00:05,pablolaptop.pegaso.lan,40,650
2024-06-08 18:10:06,pablolaptop.pegaso.lan,38,440
2024-06-08 18:20:07,pablolaptop.pegaso.lan,32,440
2024-06-08 18:30:07,pablolaptop.pegaso.lan,36,440
2024-06-08 18:40:08,pablolaptop.pegaso.lan,34,440
2024-06-08 18:50:08,pablolaptop.pegaso.lan,42,450
2024-06-08 19:00:09,pablolaptop.pegaso.lan,41,455
2024-06-08 19:10:00,pablolaptop.pegaso.lan,45,450
2024-06-08 19:20:00,pablolaptop.pegaso.lan,32,440
2024-06-08 19:30:01,pablolaptop.pegaso.lan,36,440
2024-06-08 19:40:01,pablolaptop.pegaso.lan,38,440
2024-06-08 20:00:03,pablolaptop.pegaso.lan,47,450
2024-06-08 20:10:00,pablolaptop.pegaso.lan,43,450
2024-06-08 20:20:49,pablolaptop.pegaso.lan,41,450
2024-06-08 20:30:49,pablolaptop.pegaso.lan,43,450
2024-06-08 20:40:49,pablolaptop.pegaso.lan,36,440
2024-06-08 20:50:49,pablolaptop.pegaso.lan,31,440
2024-06-08 21:00:49,pablolaptop.pegaso.lan,30,440
Binary file added docs/demo/sa08
Binary file not shown.
Loading

0 comments on commit 6fcb6aa

Please sign in to comment.