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

feat: support metric for module type in frus #3411

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Conversation

Hardikl
Copy link
Contributor

@Hardikl Hardikl commented Jan 7, 2025

Without changes:

% curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   | grep psu       
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",part_number="114-00148+A3",psu_id="1",serial="PSQ094172300226",shelf="1.1",status="normal",type="7D"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 95
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 913
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",part_number="114-00148+A3",psu_id="2",serial="PSQ094172300051",shelf="1.1",status="normal",type="7D"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 106
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 913

With the changes: new metrics for module type are added only in shelf_psu_labels and shelf_psu_status.

% curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   | grep psu  
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0311",part_number="111-02850+C1",psu_id="0",psu_type="",serial="031740001586",shelf="1.1",status="normal",type="module"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="0",shelf="1.1",type="module"} 1
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0311",part_number="111-02850+C1",psu_id="1",psu_type="",serial="031740001585",shelf="1.1",status="normal",type="module"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="module"} 1
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0111",part_number="114-00148+A3",psu_id="1",psu_type="7D",serial="PSQ094172300226",shelf="1.1",status="normal",type="psu"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 95
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 913
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0111",part_number="114-00148+A3",psu_id="2",psu_type="7D",serial="PSQ094172300051",shelf="1.1",status="normal",type="psu"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 106
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 913
image

Added firmware_version label as requested by customer.

@cla-bot cla-bot bot added the cla-signed label Jan 7, 2025
@Hardikl Hardikl linked an issue Jan 7, 2025 that may be closed by this pull request
@Hardikl
Copy link
Contributor Author

Hardikl commented Jan 7, 2025

ZapiPerf changes are in next PR

@rahulguptajss
Copy link
Contributor

Without changes:

% curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   | grep psu       
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",part_number="114-00148+A3",psu_id="1",serial="PSQ094172300226",shelf="1.1",status="normal",type="7D"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 95
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1"} 913
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",part_number="114-00148+A3",psu_id="2",serial="PSQ094172300051",shelf="1.1",status="normal",type="7D"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 106
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1"} 913

With the changes: new metrics for module type are added only in shelf_psu_labels and shelf_psu_status.

% curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   | grep psu  
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0311",part_number="111-02850+C1",psu_id="0",psu_type="",serial="031740001586",shelf="1.1",status="normal",type="module"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="0",shelf="1.1",type="module"} 1
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0311",part_number="111-02850+C1",psu_id="1",psu_type="",serial="031740001585",shelf="1.1",status="normal",type="module"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="module"} 1
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0111",part_number="114-00148+A3",psu_id="1",psu_type="7D",serial="PSQ094172300226",shelf="1.1",status="normal",type="psu"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 95
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="1",shelf="1.1",type="psu"} 913
shelf_psu_labels{channel="",cluster="umeng-aff300-01-02",datacenter="rest",enabled="true",firmware_version="0111",part_number="114-00148+A3",psu_id="2",psu_type="7D",serial="PSQ094172300051",shelf="1.1",status="normal",type="psu"} 1.0
shelf_psu_status{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 1
shelf_psu_power_drawn{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 106
shelf_psu_power_rating{channel="",cluster="umeng-aff300-01-02",datacenter="rest",psu_id="2",shelf="1.1",type="psu"} 913
image Added **firmware_version** label as requested by customer.

The naming convention for the metric is shelf_psu, where psu represents the type. Adding a separate type, such as module, within the shelf_psu naming convention could lead to confusion.

@Hardikl
Copy link
Contributor Author

Hardikl commented Jan 7, 2025

ZapiPerf changes are in next PR

added the zapiperf changes.

@Hardikl
Copy link
Contributor Author

Hardikl commented Jan 7, 2025

Comparison of restperf and zapiperf, datacenter rest is RestPerf and zapi is ZapiPerf collector,

PSU metrics:

image image image image

MODULE metrics:

image image image image

One difference in both is module_id, zapiperf show as A,B whereas restperf show as 1,2

@rahulguptajss
Copy link
Contributor

Let's add these to a dashboard as well. Probably Shelf dashboard?

@rahulguptajss rahulguptajss merged commit 2bedc55 into main Jan 9, 2025
8 checks passed
@rahulguptajss rahulguptajss deleted the hl_frus_module branch January 9, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature to get shelf firmware version through harvest
3 participants