zowe / zebra

ZEBRA is an open-source incubator project for Zowe. It is a data parsing framework that allows quick and easy access to z/OS performance metrics.
https://zebra.talktothemainframe.com
Eclipse Public License 2.0
22 stars 13 forks source link

Report Title RMF III SPACEG not appears; prometheus new metrics #61

Closed fernandozangari closed 2 years ago

fernandozangari commented 2 years ago

Trying http://localhost:3090/v1/PC1B/rmf3/SPACEG

and received

Data Received: RMF-DDS-Server ZOSV2R3 3305 z/OS SPACEG report 0 ,PC1B,MVS_IMAGE MVS_IMAGE ,PC1B,MVS_IMAGE The requested report 'SPACEG' is deactivated 3

In adjunct more details.

Thanks ZEBRA-RMF3_SPACEG-Prometheus.pdf

behives commented 2 years ago

Hi @fernandozangari can you tell which version /branch are you getting it from?

also what release is zOS? ( I can't find it from VI's DDS- see attached) Screen Shot 2022-02-03 at 9 50 23 PM

Thanks,

Alex

fernandozangari commented 2 years ago

The first test was with Salisu branch but yesterday was with the last dev version (Justin updated), in both cases the same result. Thanks

behives commented 2 years ago

what version of z/OS are you using for DDS?

fernandozangari commented 2 years ago

z/OS 2.3

behives commented 2 years ago

thanks @fernandozangari . I see it from VI system now - we will need to add it to the list of parms.

@jsanter27 can you take this please?

jsanter27 commented 2 years ago

Hi @fernandozangari , can you try making the same request but adding a resource query string as so: http://localhost:3090/v1/PC1B/rmf3/SPACEG?resource=,,SYSPLEX

You may have to enter your sysplex's name if the above doesn't work: http://localhost:3090/v1/PC1B/rmf3/SPACEG?resource=,[sysplex-name],SYSPLEX

Reports like SPACEG, SYSSUM, etc. use a SYSPLEX resource as opposed to the default MVS_IMAGE resource (like in CPC and SYSINFO).

behives commented 2 years ago

Thanks @jsanter27 !

@fernandozangari now you can try all the APIs from our demo server, for example for SPACEG you can try from: https://zebra.talktothemainframe.com:3390/apis/#/RMF%20Monitor%20III/F

fernandozangari commented 2 years ago

It works!!! with [http://localhost:3090/v1/PC1B/rmf3/SPACEG?resource=,,SYSPLEX. Thanks @jsanter27 , @behives!!!

Next step: Insert this metric in prometheus.

fernandozangari commented 2 years ago

Hi @jsanter27 , how can I build a prometheus metric of SPACEG in the Zebra page http://localhost:3090/metrics (Add Custom Metrics)?, because the Report SPACEG does not appear.

Thanks

salisbuk7897 commented 2 years ago

Hi @fernandozangari , I guess Justin is out at the moment, so, let me see if I can help.

I guess the metrics UI does not support adding resource values outside the resources values in zconfig. You can add the SPAGEG metrics by going into the source code

  1. Locate metrics.json in source code folder
  2. Add the following

PC1B_SYSPLEX_SPACEG": { "lpar": "PC1B", "request": { "report": "SPACEG", "resource": ",,SYSPLEX" }, "identifiers": [ { "key": "CPCPPNAM", //select an identifier from the SPACEG report "value": "QCK2" //Select a value of your choice from SPACEG report or use the value "ALL" } ], "field": "CPCPPTOU", //select a field from the SPACEG report with numeric value "desc": "SPACEG report" //feel free to Choose a nice description }

Note: places I put comment require modifications, they are from CPC report. Modify them according to values in SPACEG report

Thanks

fernandozangari commented 2 years ago

Hi, @salisbuk7897 @jsanter27 @behives , It's working!!, I define a SPACEG metric in metric.json and now prometheus is scrapping. You have done a really very good job.