alexvasseur / cf_get_events

Cloud Foundry CLI plugin to report on APP, App Instance, Memory, Velocity, Service instance and Members per Org/Space & totals.
14 stars 2 forks source link

I want to suppress / filter out some orgs/spaces? #5

Open ghost opened 6 years ago

ghost commented 6 years ago

I would like to suppress / filter out some orgs/spaces from the counts/outputs. For example, I might want to get all AIs across the foundation, except AIs in "system" org (and relevant spaces).

alexvasseur commented 6 years ago

The sum on AI has a with and without system

+-----------------------+-----+-----+--------+
|       CATEGORY        | APP | AI  | MEMORY |
+-----------------------+-----+-----+--------+
| Total                 | 114 | 182 | 139886 |
| Total (excl system)   |  70 |  95 |  80506 |
| STARTED               |  87 | 132 | 100970 |
| STARTED (excl system) |  56 |  75 |  63670 |
+-----------------------+-----+-----+--------+

Does that covers your use case?

If you 'd want a "--exclude orgA,orgB"

Another option is to support --csv to let you post-process - but cf bcr goal is not to replace AppsManager detail csv zip export anyway.

ghost commented 6 years ago

Thanks Alex!

I didn't realize the output already does both AI counts with System and without System org. It is a bit confusing to have both.

I mean it's great to get the current totals, with or without System, but not that accurate for the historical counts.

Here's why: If you do cf bcr --ai --monthly:

cf bcr --monthly --ai
+------+-------+--------+--------+-----------------+-----------------+
| YEAR | MONTH | AI AVG | AI MAX | TASK CONCURRENT | TASK TOTAL RUNS |
+------+-------+--------+--------+-----------------+-----------------+
| 2018 |     6 |     14 |     29 |               1 |              14 |
| 2018 |     5 |      1 |     12 |               2 |              28 |
|    0 |     0 |      0 |      0 |               0 |               0 |
|    0 |     0 |      0 |      0 |               0 |               0 |
|    0 |     0 |      0 |      0 |               0 |               0 |
|    0 |     0 |      0 |      0 |               0 |               0 |
|    0 |     0 |      0 |      0 |               0 |               0 |
+------+-------+--------+--------+-----------------+-----------------+

The system org seems to be included. It would be great to be able to suppress an org (e.g. system) or multiple orgs, and then have proper counts. Maybe even specify the list of orgs we are interested to summarize data for?

alexvasseur commented 6 years ago

cf bcr --monthly is a standalone option It does capture the exact same report than the AppsManager report - which according to Pivotal doc excludes system org. I am happy to rename this table title if this helps clarify.

alexvasseur commented 6 years ago

Any comments?