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

added csv stats knob #37

Merged
merged 9 commits into from
May 31, 2024
Merged

added csv stats knob #37

merged 9 commits into from
May 31, 2024

Conversation

amohit1315
Copy link
Collaborator

@amohit1315 amohit1315 commented May 30, 2024

Related Issue(s): #31
#35

Added csv-stats to output pre-gnmi and gnmi telemetry data in csv format.
Moved few print statements to stream log file

Example:
./jtimon-linux-amd64 --config test.json --no-per-packet-goroutines --stats-handler

csv-stats.csv

sensor-path,sequence-number,component-id,sub-component-id,packet-size,p-ts,e-ts,re-stream-creation-ts,re-payload-get-ts
sensor_1005_2_1:/system/processes/process/state/:/system/processes/process/state/:jkdsd,2097152,65535,0,503,1717034713088980419,1717034713110000000,0,0
sensor_1005_2_1:/system/processes/process/state/:/system/processes/process/state/:jkdsd,2097153,65535,0,500,1717034713089246396,1717034713110000000,0,0
sensor_1005_2_1:/system/processes/process/state/:/system/processes/process/state/:jkdsd,2097154,65535,0,508,1717034713089452536,1717034713110000000,0,0
sensor_1005_2_1:/system/processes/process/state/:/system/processes/process/state/:jkdsd,2097155,65535,0,506,1717034713089691411,1717034713110000000,0,0
sensor_1005_2_1:/system/processes/process/state/:/system/processes/process/state/:jkdsd,2097156,65535,0,495,1717034713089904642,1717034713110000000,0,0

To get the csv file, need to set to true within internal-jtimon configuration. csv output file path can also be specified in internal-jtimon but its not mandatory.

Sample Configuration:

{
    "host": "10.54.130.1",
    "port": 32767,
    "user": "root",
    "cid": "external2",
    "password": "Embe1mpls",
    "vendor": {
        "gnmi": {
          "encoding": "protobuf"
        }
    },    
    "internal-jtimon" : {
        "data-log-file": "/homes/regress/test/gnmidatata.log",
	"csv-log-file": "/homes/regress/test/test.csv"
    },
    "eos": true,
    "vendor": {
        "gnmi": {
          "encoding": "protobuf"
        }
    },
    "paths": [{
        "path": "/system/processes/process/state/",
        "freq": 10000
    },
    {
	"path": "/components/",
        "freq": 10000,
	"pre-gnmi": true
    },
    {
        "path": "/system/alarms/",
        "freq": 10000
    }],
    "log" : {
        "file": "/tmp/test-jtimon.log",
        "verbose": false
    }
}

Copy link
Collaborator

@M-Vivek-Juniper M-Vivek-Juniper left a comment

Choose a reason for hiding this comment

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

Pls check the comments

coverage.out Outdated Show resolved Hide resolved
config.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
config.go Outdated Show resolved Hide resolved
workers.go Outdated Show resolved Hide resolved
statshandler.go Outdated Show resolved Hide resolved
statshandler.go Show resolved Hide resolved
internal_jtimon.go Outdated Show resolved Hide resolved
subscribe_gnmi.go Outdated Show resolved Hide resolved
@amohit1315 amohit1315 marked this pull request as ready for review May 31, 2024 17:05
Copy link
Collaborator

@M-Vivek-Juniper M-Vivek-Juniper left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of comments.

@amohit1315 amohit1315 removed the request for review from nsimariaj May 31, 2024 17:06
@M-Vivek-Juniper M-Vivek-Juniper merged commit 7e291a8 into master May 31, 2024
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.

2 participants