Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two identifiers in metrics.json doesn´t seem to work as expected[BUG] #97

Open
fernandozangari opened this issue Mar 18, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@fernandozangari
Copy link
Collaborator

Describe the bug
I have test the metrics.json with two identifiers but it seems not to work

To Reproduce
I have test the metrics.json with two identifiers but it seems not to work, in the case of channel I use

a) First identifier ==> Type Channel (doesn´t work)
.......
"PC1B_CHACPIVC_FC": {
"lpar": "PC1B",
"request": {
"report": "CHANNEL",
"resource": ",PC1B,MVS_IMAGE"
},
"identifiers": [
{
"key": "CHACPTVC",
"value": "FC"
},
{
"key": "CHACPIVC",
"value": "ALL"
}
],
"field": "CHACPUVC",
"desc": "Channel - Part util %"
},
"PC1B_CHACPIVC_OSD": {
"lpar": "PC1B",
"request": {
"report": "CHANNEL",
"resource": ",PC1B,MVS_IMAGE"
},
"identifiers": [
{
"key": "CHACPTVC",
"value": "OSD"
},
{
"key": "CHACPIVC",
"value": "ALL"
}
],
.....

b) First Channel ID (repeat the metric without selecting the channel type)

.....
"PC1B_CHACPIVC_FC": {
	"lpar": "PC1B",
	"request": {
		"report": "CHANNEL",
		"resource": ",PC1B,MVS_IMAGE"
	},
	"identifiers": [
		{
			"key": "CHACPIVC",
			"value": "ALL"
		},
                {
			"key": "CHACPTVC",
			"value": "FC"
		}
	],
	"field": "CHACPUVC",
	"desc": "Channel - Part util %"
},
"PC1B_CHACPIVC_OSD": {
	"lpar": "PC1B",
	"request": {
		"report": "CHANNEL",
		"resource": ",PC1B,MVS_IMAGE"
	},
	"identifiers": [
		{
			"key": "CHACPIVC",
			"value": "ALL"
		},
                {
			"key": "CHACPTVC",
			"value": "OSD"
		}
	],
.....

Do you have an example of this type of coding because there is none in Zebra site.

Expected behavior
A qualified naming build that facilitate dashboard build

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows10
  • Browser [chromei]

Additional context
Do you have an example of this type of coding because there is none in Zebra site.

@fernandozangari fernandozangari added the bug Something isn't working label Mar 18, 2022
@fernandozangari
Copy link
Collaborator Author

In the front end Metrics of Zebra site, how we insert two pairs of objects Indentifiers(key,value)?

@behives
Copy link
Member

behives commented Mar 18, 2022

As discussed today, the issue seems like coming from a previous recognized value of 'ALL' doesn't get recognized any more in key/value pair of metrics.json, specifically for CHANNEL activities. When each key/value pairs are manually added using specific values, it gets logged into Promethus and we were able to pull it into Grafana.


	"RPRT_00_OSC_CHACPUVC": {
	"lpar": "RPRT",
	"request": {
		"report": "CHANNEL",
		"resource": ",RPRT,MVS_IMAGE"
	},
	"identifiers": [
		{
			"key": "CHACPIVC",
			"value": "00"
		},
                {
			"key": "CHACPTVC",
			"value": "OSC"
		}
	],
	"field": "CHACPUVC",
	"desc": "Channel - Part util %"
	}

Above config in metrics.json will trigger APIs to Zebra and logging to prometheus as following:

# HELP RPRT_00_OSC_CHACPUVC Channel - Part util %
# TYPE RPRT_00_OSC_CHACPUVC gauge
RPRT_00_OSC_CHACPUVC{parm="CHACPUVC"} 0


@behives
Copy link
Member

behives commented Mar 18, 2022

@jsanter27 Now the question becomes, how to provide 'grouping' capability back using one 'channel type' grouped without specifying CHPID in the resource name, but grouped/concatenated for all the same channel types. (e.g. all OSC channel type with all OSC CHPIDs under PC1B_CHACPIVC_OSD , all FC channel type grouped with all FC type CHPIDs under PC1B_CHACPIVC_FC etc.

@behives
Copy link
Member

behives commented Nov 17, 2022

@salisbuk7897 has implemented a version to fix this issue and tested in his local workstation.

https://drive.google.com/file/d/1OjgAkVxN-VRVLq0G7hSgBWwIHU1BI3k0/view

is the video of this function demo.

@fernandozangari if this is what you were expecting - please confirm and we should update/release to test and merge to main later.

Thank you Salisu!

@fernandozangari
Copy link
Collaborator Author

Yes; one more question, is possible to use two identifiers with "value" : "ALL"?

@salisbuk7897
Copy link
Contributor

Yes @fernandozangari . You can use two or more identifiers with value "ALL". It works fine

@fernandozangari
Copy link
Collaborator Author

Great!!

@fernandozangari
Copy link
Collaborator Author

This new feature has really great potential.

@behives
Copy link
Member

behives commented Jan 10, 2023

@salisbuk7897 when get a chance, please commit fixed codes.
Thank you!
Alex

@salisbuk7897
Copy link
Contributor

Okay. The work for the backend is complete. The work for the frontend is still in progress. I will make a commit(hopefully by tomorrow) that will allow users to create a metrics.json manually before the UI will be completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants