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

SRL 24.x compatibility: gNMI paths and clab example #74

Open
sacckth opened this issue Apr 19, 2024 · 3 comments
Open

SRL 24.x compatibility: gNMI paths and clab example #74

sacckth opened this issue Apr 19, 2024 · 3 comments

Comments

@sacckth
Copy link

sacckth commented Apr 19, 2024

on app/server.go following change needs to happen:

--- a/app/server.go
+++ b/app/server.go
@@ -37,7 +37,7 @@ const (
        metricNameRegex      = "[^a-zA-Z0-9_]+"
        serviceName          = "srl-prometheus-exporter"
        retryInterval        = 2 * time.Second
-       gnmiServerUnixSocket = "unix:///opt/srlinux/var/run/sr_gnmi_server"
+       gnmiServerUnixSocket = "unix:///opt/srlinux/var/run/sr_grpc_server_insecure-mgmt"
 )

Some of the acls need to be changed for this to work on 24 release:

updates:

- path: /system/grpc-server[name=insecure-mgmt]
  encoding: json_ietf
  value:
    admin-state: enable
    metadata-authentication: false
    services:
      - gnmi

- path: /acl/acl-filter[name=cpm][type=ipv4]/entry[sequence-id=281]
  encoding: json_ietf
  value:
    action:
      accept: {}
    match:
      ipv4:
        protocol: tcp
      transport:  
        destination-port:
          range:
            start: 8000
            end: 9999

- path: /acl/acl-filter[name=cpm][type=ipv4]/entry[sequence-id=282]
  encoding: json_ietf
  value:
    action:
      accept: {}
    match:
      ipv4:
        protocol: tcp
      transport:  
        source-port:
          range:
            start: 8000
            end: 9999
@sacckth
Copy link
Author

sacckth commented Apr 19, 2024

Also the chassis-mac address path:

--- a/app/server.go
+++ b/app/server.go
@@ -726,7 +726,7 @@ START:
                                if strings.Contains(p, "platform/chassis/type") {
                                        sysInfo.ChassisType = u.GetVal().GetStringVal()
                                }
-                               if strings.Contains(p, "platform/chassis/mac-address") {
+                               if strings.Contains(p, "platform/chassis/hw-mac-address") {
                                        sysInfo.ChassisMacAddress = u.GetVal().GetStringVal()

@sacckth sacckth changed the title SRL 24.x compatibility: gNMI path and clab example SRL 24.x compatibility: gNMI paths and clab example Apr 19, 2024
@sacckth
Copy link
Author

sacckth commented Apr 19, 2024

Also system hostname:

@@ -717,7 +717,7 @@ START:
                                                sysInfo.IPAddrV6 = strings.Split(ip, "/")[0]
                                        }
                                }
-                               if strings.Contains(p, "system/name") {
+                               if strings.Contains(p, "system/name/host-name") {
                                        sysInfo.Name = u.GetVal().GetStringVal()
                                }

@sacckth
Copy link
Author

sacckth commented Apr 19, 2024

And some metrics under app/metric.go

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

No branches or pull requests

1 participant