Skip to content

08 24 feat sparkles add hychain metrics#119

Draft
alex-klikatech wants to merge 17 commits into
mainfrom
08-24-feat_sparkles_adds_hychain_service
Draft

08 24 feat sparkles add hychain metrics#119
alex-klikatech wants to merge 17 commits into
mainfrom
08-24-feat_sparkles_adds_hychain_service

Conversation

@alex-klikatech

Copy link
Copy Markdown
Contributor

No description provided.

@alex-klikatech alex-klikatech marked this pull request as draft September 27, 2024 14:31
class MetricsCollector(Collector):
"""Collector for Gala Node information"""
def total_uptime_count(sefl, autonomi_service_date):
def total_uptime_count(sefl, hychain_service_date):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter sefl in the method definition is a typo and should be corrected to self. This correction is necessary to ensure proper access to instance attributes and methods within the class. Consider updating the method signature to:

def total_uptime_count(self, hychain_service_date):

This change will align with Python conventions and prevent potential errors in method execution.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

p = pid_decription.split()[0]
if p == pid_id:
print(pid_decription)
mounth = pid_decription.split()[3]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable mounth is misspelled and should be corrected to month. This typo could potentially lead to confusion and errors in date handling. Consider updating the variable name to ensure clarity and consistency throughout the code.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

minutes = int(state_uptime_dic[1])
seconds = int(state_uptime_dic[2])
state_uptime=seconds+minutes*60+hours*3600
date_str = mounth + "-" + day + "-" + years + " " + time_str

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable mounth is misspelled. It should be corrected to month to accurately represent the month value and prevent potential errors in date string construction.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +61 to +63
for pid_decription in services_pids:
pid_decription = pid_decription.decode("utf-8")
p = pid_decription.split()[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable pid_decription appears to be a typo and should be corrected to pid_description. This misspelling is consistent throughout the loop. It's advisable to correct all instances of this variable name for improved code readability and to prevent potential confusion or errors in future maintenance.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@anthonyra

Copy link
Copy Markdown
Contributor

I'm curious if this collector is repeating the metrics already collected by the Netdata agent running on the VM. Since it appears it's only collecting the time and status of the process related to the node? If there isn't a CLI or metric provided by the software, we might need to incorporate a API call to the blockchain and see if rewards are being collected as a proxy.

@skuznetsov-klika

Copy link
Copy Markdown

I'm curious if this collector is repeating the metrics already collected by the Netdata agent running on the VM. Since it appears it's only collecting the time and status of the process related to the node? If there isn't a CLI or metric provided by the software, we might need to incorporate a API call to the blockchain and see if rewards are being collected as a proxy.

There are only CLI commands for HYCHAIN Guardian Node Software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants