This project is archived. Its data is read-only. This project is read-only.
nx-os environment stats aren't being retrieved
I'm not really with Go but I'm running into a issue where my config file says to retrieve environment stats and the endpoint says there weren't any errors retrieving them, but I don't see any stats anything. I've got a Nexus 3048 and I'm running this against with nx-os version 6.0(2)U6(6). When I run `curl http:/localhost:9457/metrics` I get the following: ``` # HELP cisco_collect_duration_seconds Duration of a scrape by collector and target # TYPE cisco_collect_duration_seconds gauge cisco_collect_duration_seconds{collector="cpu",target="redacted"} 2.803167519 cisco_collect_duration_seconds{collector="environment",target="redacted"} 1.2932364060000001 cisco_collect_duration_seconds{collection="memory",target="redacted"} 3.85329757 # HELP cisco_collector_duration_seconds Duration of a collector scrape for one target # TYPE cisco_collector_duration_seconds gauge cisco_collector_duration_seconds{target="redacted"} 7.94972212 # HELP cisco_collector_errors Error counter of a scrape by collector and target # TYPE cisco_collector_errors gauge cisco_collector_errors{collector="cpu",target="redacted"} 0 cisco_collector_errors{collector="environment",target="redacted"} 0 cisco_collector_errors{collector="memory",target="redacted"} 0 # HELP cisco_cpu_usage_percent CPU Usage on NX-OS devices # TYPE cisco_cpu_usage_percent gauge cisco_cpu_usage_percent{state="idle",target="redacted"} 90.5 cisco_cpu_usage_percent{state="kernel",target="redacted"} 0.5 cisco_cpu_usage_percent{state="user",target="redacted"} 9 # HELP cisco_memory_total_bytes Total available bytes # TYPE cisco_memory_total_bytes gauge cisco_memory_total_bytes{subsystem="system",target="redacted"} 3.75320576e+09 # HELP cisco_memory_used_bytes Used bytes # TYPE cisco_memory_used_bytes gauge cisco_memory_used_bytes{subsystem="system",target="redacted"} 2.374176768e+09 # HELP cisco_up Scrape of target was successful # TYPE cisco_up gauge cisco_up{target="redacted"} 1 # HELP cisco_version_info Information about the running operating system # TYPE cisco_version_info gauge cisco_version_info{os_name="nx-os",target="redacted"} 1 ``` Just from a quick look at the `collectNXOS` function in `environment/collector.go` I'm guessing that none of the if statements are being triggered, but I'm not really sure how to debug that. Let me know if there's any other info you want Thanks
issue