For integration tests. Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support non-linux GOOS in e2e tests Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support e2e tests on freebsd Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support e2e tests on openbsd Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support e2e tests on netbsd Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support e2e tests on solaris Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: support e2e tests on dragonfly Signed-off-by: Pranshu Srivastava <rexagod@gmail.com> chore: drop support for e2e tests on solaris Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>pull/3239/head
parent
38f71f576c
commit
3430dcfab8
@ -0,0 +1,175 @@ |
||||
name: bsd |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- master |
||||
pull_request: |
||||
branches: |
||||
- master |
||||
|
||||
permissions: |
||||
contents: read |
||||
|
||||
env: |
||||
GO_VERSION_FREEBSD: "123" |
||||
GO_VERSION_OPENBSD: "1.23.1" |
||||
GO_VERSION_NETBSD: "123" |
||||
GO_VERSION_DRAGONFLY: "1.23.3" |
||||
GNU_TAR_VERSION: "1.35" |
||||
|
||||
# To spin up one of the VMs below, see the "Debug Shell" section here: https://github.com/vmactions |
||||
jobs: |
||||
test_freebsd: |
||||
name: Run end-to-end tests on FreeBSD |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout the repository |
||||
uses: actions/checkout@v4 |
||||
- name: test-e2e |
||||
uses: vmactions/freebsd-vm@v1 |
||||
with: |
||||
copyback: false |
||||
envs: 'GO_VERSION_FREEBSD GNU_TAR_VERSION' |
||||
usesh: true |
||||
prepare: | |
||||
pkg update -f |
||||
pkg install -y bash curl gtar git gmake gsed gnugrep go${GO_VERSION_FREEBSD} python |
||||
run: | |
||||
echo "::group::Setup prerequisites" |
||||
set -eu |
||||
mkdir bin |
||||
ln -s $(which go${GO_VERSION_FREEBSD}) $(pwd)/bin/go |
||||
ln -s $(which ggrep) $(pwd)/bin/grep |
||||
ln -s $(which gmake) $(pwd)/bin/make |
||||
ln -s $(which gsed) $(pwd)/bin/sed |
||||
ln -s $(which gtar) $(pwd)/bin/tar |
||||
export PATH=$(pwd)/bin:$PATH |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Print environment information" |
||||
uname -a |
||||
echo "GOOS: $(go env GOOS)" |
||||
echo "GOARCH: $(go env GOARCH)" |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Run End-to-End Tests" |
||||
git config --global --add safe.directory $(pwd) |
||||
gmake test-e2e |
||||
echo "::endgroup::" |
||||
|
||||
test_openbsd: |
||||
name: Run end-to-end tests on OpenBSD |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout the repository |
||||
uses: actions/checkout@v4 |
||||
- name: test-e2e |
||||
uses: vmactions/openbsd-vm@v1 |
||||
with: |
||||
copyback: false |
||||
envs: 'GO_VERSION_OPENBSD GNU_TAR_VERSION' |
||||
usesh: true |
||||
prepare: | |
||||
pkg_add -u |
||||
pkg_add bash curl gtar-${GNU_TAR_VERSION}p0-static git gmake gsed ggrep go-${GO_VERSION_OPENBSD} python |
||||
run: | |
||||
echo "::group::Setup prerequisites" |
||||
set -eu |
||||
mkdir bin |
||||
ln -s $(which ggrep) $(pwd)/bin/grep |
||||
ln -s $(which gmake) $(pwd)/bin/make |
||||
ln -s $(which gsed) $(pwd)/bin/sed |
||||
ln -s $(which gtar) $(pwd)/bin/tar |
||||
export PATH=$(pwd)/bin:$PATH |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Print environment information" |
||||
uname -a |
||||
echo "GOOS: $(go env GOOS)" |
||||
echo "GOARCH: $(go env GOARCH)" |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Run End-to-End Tests" |
||||
git config --global --add safe.directory $(pwd) |
||||
make test-e2e |
||||
echo "::endgroup::" |
||||
|
||||
test_netbsd: |
||||
name: Run end-to-end tests on NetBSD |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout the repository |
||||
uses: actions/checkout@v4 |
||||
- name: test-e2e |
||||
uses: vmactions/netbsd-vm@v1 |
||||
with: |
||||
copyback: false |
||||
envs: 'GO_VERSION_NETBSD GNU_TAR_VERSION' |
||||
usesh: true |
||||
prepare: | |
||||
/usr/sbin/pkg_add -u |
||||
/usr/sbin/pkg_add curl gtar-base-${GNU_TAR_VERSION} git gmake gsed grep go${GO_VERSION_NETBSD} python312 |
||||
run: | |
||||
echo "::group::Setup prerequisites" |
||||
set -eu |
||||
mkdir bin |
||||
ln -s $(which go${GO_VERSION_NETBSD}) $(pwd)/bin/go |
||||
ln -s $(which ggrep) $(pwd)/bin/grep |
||||
ln -s $(which gmake) $(pwd)/bin/make |
||||
ln -s $(which gsed) $(pwd)/bin/sed |
||||
ln -s $(which gtar) $(pwd)/bin/tar |
||||
export PATH=$(pwd)/bin:$PATH |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Print environment information" |
||||
uname -a |
||||
echo "GOOS: $(go env GOOS)" |
||||
echo "GOARCH: $(go env GOARCH)" |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Run End-to-End Tests" |
||||
git config --global --add safe.directory $(pwd) |
||||
make test-e2e |
||||
echo "::endgroup::" |
||||
|
||||
test_dragonfly: |
||||
name: Run end-to-end tests on DragonFly |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout the repository |
||||
uses: actions/checkout@v4 |
||||
- name: test-e2e |
||||
uses: vmactions/dragonflybsd-vm@v1 |
||||
with: |
||||
copyback: false |
||||
envs: 'GO_VERSION_DRAGONFLY' |
||||
usesh: true |
||||
prepare: | |
||||
pkg update && pkg upgrade -y |
||||
pkg install -y bash wget gtar git gmake gsed gnugrep python3 |
||||
run: | |
||||
echo "::group::Setup prerequisites" |
||||
set -eu |
||||
mkdir bin |
||||
export PATH=$(pwd)/bin:$PATH |
||||
wget https://go.dev/dl/go${GO_VERSION_DRAGONFLY}.dragonfly-amd64.tar.gz |
||||
gtar xzf go${GO_VERSION_DRAGONFLY}.dragonfly-amd64.tar.gz |
||||
ln -s $(pwd)/go/bin/go $(pwd)/bin/go |
||||
ln -s $(which ggrep) $(pwd)/bin/grep |
||||
ln -s $(which gmake) $(pwd)/bin/make |
||||
ln -s $(which gsed) $(pwd)/bin/sed |
||||
ln -s $(which gtar) $(pwd)/bin/tar |
||||
ln -s $(which python3) $(pwd)/bin/python |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Print environment information" |
||||
uname -a |
||||
echo "GOOS: $(go env GOOS)" |
||||
echo "GOARCH: $(go env GOARCH)" |
||||
echo "::endgroup::" |
||||
|
||||
echo "::group::Run End-to-End Tests" |
||||
git config --global --add safe.directory $(pwd) |
||||
gmake test-e2e |
||||
echo "::endgroup::" |
||||
@ -0,0 +1,256 @@ |
||||
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles. |
||||
# TYPE go_gc_duration_seconds summary |
||||
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent |
||||
# TYPE go_gc_gogc_percent gauge |
||||
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes |
||||
# TYPE go_gc_gomemlimit_bytes gauge |
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
# HELP go_info Information about the Go environment. |
||||
# TYPE go_info gauge |
||||
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_alloc_bytes gauge |
||||
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes. |
||||
# TYPE go_memstats_alloc_bytes_total counter |
||||
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes. |
||||
# TYPE go_memstats_buck_hash_sys_bytes gauge |
||||
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_frees_total counter |
||||
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes. |
||||
# TYPE go_memstats_gc_sys_bytes gauge |
||||
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_heap_alloc_bytes gauge |
||||
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_idle_bytes gauge |
||||
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes |
||||
# TYPE go_memstats_heap_inuse_bytes gauge |
||||
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects. |
||||
# TYPE go_memstats_heap_objects gauge |
||||
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes. |
||||
# TYPE go_memstats_heap_released_bytes gauge |
||||
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_sys_bytes gauge |
||||
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection. |
||||
# TYPE go_memstats_last_gc_time_seconds gauge |
||||
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_mallocs_total counter |
||||
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes. |
||||
# TYPE go_memstats_mcache_inuse_bytes gauge |
||||
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes. |
||||
# TYPE go_memstats_mcache_sys_bytes gauge |
||||
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes. |
||||
# TYPE go_memstats_mspan_inuse_bytes gauge |
||||
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes. |
||||
# TYPE go_memstats_mspan_sys_bytes gauge |
||||
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes. |
||||
# TYPE go_memstats_next_gc_bytes gauge |
||||
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes. |
||||
# TYPE go_memstats_other_sys_bytes gauge |
||||
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes. |
||||
# TYPE go_memstats_stack_inuse_bytes gauge |
||||
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes. |
||||
# TYPE go_memstats_stack_sys_bytes gauge |
||||
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte. |
||||
# TYPE go_memstats_sys_bytes gauge |
||||
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads |
||||
# TYPE go_sched_gomaxprocs_threads gauge |
||||
# HELP go_threads Number of OS threads created. |
||||
# TYPE go_threads gauge |
||||
# HELP node_buddyinfo_blocks Count of free blocks according to size. |
||||
# TYPE node_buddyinfo_blocks gauge |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0 |
||||
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build. |
||||
# TYPE node_exporter_build_info gauge |
||||
# HELP node_network_receive_bytes_total Network device statistic receive_bytes. |
||||
# TYPE node_network_receive_bytes_total counter |
||||
# HELP node_network_receive_drop_total Network device statistic receive_drop. |
||||
# TYPE node_network_receive_drop_total counter |
||||
node_network_receive_drop_total{device="lo0"} 0 |
||||
# HELP node_network_receive_errs_total Network device statistic receive_errs. |
||||
# TYPE node_network_receive_errs_total counter |
||||
node_network_receive_errs_total{device="lo0"} 0 |
||||
# HELP node_network_receive_multicast_total Network device statistic receive_multicast. |
||||
# TYPE node_network_receive_multicast_total counter |
||||
node_network_receive_multicast_total{device="lo0"} 0 |
||||
# HELP node_network_receive_packets_total Network device statistic receive_packets. |
||||
# TYPE node_network_receive_packets_total counter |
||||
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes. |
||||
# TYPE node_network_transmit_bytes_total counter |
||||
# HELP node_network_transmit_drop_total Network device statistic transmit_drop. |
||||
# TYPE node_network_transmit_drop_total counter |
||||
node_network_transmit_drop_total{device="lo0"} 0 |
||||
# HELP node_network_transmit_errs_total Network device statistic transmit_errs. |
||||
# TYPE node_network_transmit_errs_total counter |
||||
node_network_transmit_errs_total{device="lo0"} 0 |
||||
# HELP node_network_transmit_packets_total Network device statistic transmit_packets. |
||||
# TYPE node_network_transmit_packets_total counter |
||||
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id. |
||||
# TYPE node_os_info gauge |
||||
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1 |
||||
# HELP node_os_version Metric containing the major.minor part of the OS version. |
||||
# TYPE node_os_version gauge |
||||
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04 |
||||
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape. |
||||
# TYPE node_scrape_collector_duration_seconds gauge |
||||
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded. |
||||
# TYPE node_scrape_collector_success gauge |
||||
node_scrape_collector_success{collector="boottime"} 1 |
||||
node_scrape_collector_success{collector="buddyinfo"} 1 |
||||
node_scrape_collector_success{collector="cpu"} 1 |
||||
node_scrape_collector_success{collector="exec"} 1 |
||||
node_scrape_collector_success{collector="loadavg"} 1 |
||||
node_scrape_collector_success{collector="meminfo"} 0 |
||||
node_scrape_collector_success{collector="netdev"} 1 |
||||
node_scrape_collector_success{collector="os"} 1 |
||||
node_scrape_collector_success{collector="textfile"} 1 |
||||
node_scrape_collector_success{collector="time"} 1 |
||||
node_scrape_collector_success{collector="xfrm"} 1 |
||||
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime_seconds gauge |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP node_time_seconds System time in seconds since epoch (1970). |
||||
# TYPE node_time_seconds gauge |
||||
# HELP node_time_zone_offset_seconds System time zone offset in seconds. |
||||
# TYPE node_time_zone_offset_seconds gauge |
||||
# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use |
||||
# TYPE node_xfrm_acquire_error_packets_total counter |
||||
node_xfrm_acquire_error_packets_total 24532 |
||||
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed |
||||
# TYPE node_xfrm_fwd_hdr_error_packets_total counter |
||||
node_xfrm_fwd_hdr_error_packets_total 6654 |
||||
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left |
||||
# TYPE node_xfrm_in_buffer_error_packets_total counter |
||||
node_xfrm_in_buffer_error_packets_total 2 |
||||
# HELP node_xfrm_in_error_packets_total All errors not matched by other |
||||
# TYPE node_xfrm_in_error_packets_total counter |
||||
node_xfrm_in_error_packets_total 1 |
||||
# HELP node_xfrm_in_hdr_error_packets_total Header error |
||||
# TYPE node_xfrm_in_hdr_error_packets_total counter |
||||
node_xfrm_in_hdr_error_packets_total 4 |
||||
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found |
||||
# TYPE node_xfrm_in_no_pols_packets_total counter |
||||
node_xfrm_in_no_pols_packets_total 65432 |
||||
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong |
||||
# TYPE node_xfrm_in_no_states_packets_total counter |
||||
node_xfrm_in_no_states_packets_total 3 |
||||
# HELP node_xfrm_in_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_in_pol_block_packets_total counter |
||||
node_xfrm_in_pol_block_packets_total 100 |
||||
# HELP node_xfrm_in_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_in_pol_error_packets_total counter |
||||
node_xfrm_in_pol_error_packets_total 10000 |
||||
# HELP node_xfrm_in_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_in_state_expired_packets_total counter |
||||
node_xfrm_in_state_expired_packets_total 7 |
||||
# HELP node_xfrm_in_state_invalid_packets_total State is invalid |
||||
# TYPE node_xfrm_in_state_invalid_packets_total counter |
||||
node_xfrm_in_state_invalid_packets_total 55555 |
||||
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch |
||||
# TYPE node_xfrm_in_state_mismatch_packets_total counter |
||||
node_xfrm_in_state_mismatch_packets_total 23451 |
||||
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_in_state_mode_error_packets_total counter |
||||
node_xfrm_in_state_mode_error_packets_total 100 |
||||
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong |
||||
# TYPE node_xfrm_in_state_proto_error_packets_total counter |
||||
node_xfrm_in_state_proto_error_packets_total 40 |
||||
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window |
||||
# TYPE node_xfrm_in_state_seq_error_packets_total counter |
||||
node_xfrm_in_state_seq_error_packets_total 6000 |
||||
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong |
||||
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter |
||||
node_xfrm_in_tmpl_mismatch_packets_total 51 |
||||
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error |
||||
# TYPE node_xfrm_out_bundle_check_error_packets_total counter |
||||
node_xfrm_out_bundle_check_error_packets_total 555 |
||||
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error |
||||
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter |
||||
node_xfrm_out_bundle_gen_error_packets_total 43321 |
||||
# HELP node_xfrm_out_error_packets_total All errors which is not matched others |
||||
# TYPE node_xfrm_out_error_packets_total counter |
||||
node_xfrm_out_error_packets_total 1e+06 |
||||
# HELP node_xfrm_out_no_states_packets_total No state is found |
||||
# TYPE node_xfrm_out_no_states_packets_total counter |
||||
node_xfrm_out_no_states_packets_total 869 |
||||
# HELP node_xfrm_out_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_out_pol_block_packets_total counter |
||||
node_xfrm_out_pol_block_packets_total 43456 |
||||
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead |
||||
# TYPE node_xfrm_out_pol_dead_packets_total counter |
||||
node_xfrm_out_pol_dead_packets_total 7656 |
||||
# HELP node_xfrm_out_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_out_pol_error_packets_total counter |
||||
node_xfrm_out_pol_error_packets_total 1454 |
||||
# HELP node_xfrm_out_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_out_state_expired_packets_total counter |
||||
node_xfrm_out_state_expired_packets_total 565 |
||||
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired |
||||
# TYPE node_xfrm_out_state_invalid_packets_total counter |
||||
node_xfrm_out_state_invalid_packets_total 28765 |
||||
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_out_state_mode_error_packets_total counter |
||||
node_xfrm_out_state_mode_error_packets_total 8 |
||||
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error |
||||
# TYPE node_xfrm_out_state_proto_error_packets_total counter |
||||
node_xfrm_out_state_proto_error_packets_total 4542 |
||||
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow |
||||
# TYPE node_xfrm_out_state_seq_error_packets_total counter |
||||
node_xfrm_out_state_seq_error_packets_total 543 |
||||
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler. |
||||
# TYPE promhttp_metric_handler_errors_total counter |
||||
promhttp_metric_handler_errors_total{cause="encoding"} 0 |
||||
promhttp_metric_handler_errors_total{cause="gathering"} 0 |
||||
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served. |
||||
# TYPE promhttp_metric_handler_requests_in_flight gauge |
||||
promhttp_metric_handler_requests_in_flight 1 |
||||
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code. |
||||
# TYPE promhttp_metric_handler_requests_total counter |
||||
promhttp_metric_handler_requests_total{code="200"} 0 |
||||
promhttp_metric_handler_requests_total{code="500"} 0 |
||||
promhttp_metric_handler_requests_total{code="503"} 0 |
||||
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_1 untyped |
||||
testmetric1_1{foo="bar"} 10 |
||||
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_2 untyped |
||||
testmetric1_2{foo="baz"} 20 |
||||
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_1 untyped |
||||
testmetric2_1{foo="bar"} 30 |
||||
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_2 untyped |
||||
testmetric2_2{foo="baz"} 40 |
||||
@ -0,0 +1,294 @@ |
||||
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles. |
||||
# TYPE go_gc_duration_seconds summary |
||||
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent |
||||
# TYPE go_gc_gogc_percent gauge |
||||
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes |
||||
# TYPE go_gc_gomemlimit_bytes gauge |
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
# HELP go_info Information about the Go environment. |
||||
# TYPE go_info gauge |
||||
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_alloc_bytes gauge |
||||
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes. |
||||
# TYPE go_memstats_alloc_bytes_total counter |
||||
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes. |
||||
# TYPE go_memstats_buck_hash_sys_bytes gauge |
||||
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_frees_total counter |
||||
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes. |
||||
# TYPE go_memstats_gc_sys_bytes gauge |
||||
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_heap_alloc_bytes gauge |
||||
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_idle_bytes gauge |
||||
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes |
||||
# TYPE go_memstats_heap_inuse_bytes gauge |
||||
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects. |
||||
# TYPE go_memstats_heap_objects gauge |
||||
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes. |
||||
# TYPE go_memstats_heap_released_bytes gauge |
||||
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_sys_bytes gauge |
||||
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection. |
||||
# TYPE go_memstats_last_gc_time_seconds gauge |
||||
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_mallocs_total counter |
||||
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes. |
||||
# TYPE go_memstats_mcache_inuse_bytes gauge |
||||
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes. |
||||
# TYPE go_memstats_mcache_sys_bytes gauge |
||||
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes. |
||||
# TYPE go_memstats_mspan_inuse_bytes gauge |
||||
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes. |
||||
# TYPE go_memstats_mspan_sys_bytes gauge |
||||
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes. |
||||
# TYPE go_memstats_next_gc_bytes gauge |
||||
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes. |
||||
# TYPE go_memstats_other_sys_bytes gauge |
||||
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes. |
||||
# TYPE go_memstats_stack_inuse_bytes gauge |
||||
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes. |
||||
# TYPE go_memstats_stack_sys_bytes gauge |
||||
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte. |
||||
# TYPE go_memstats_sys_bytes gauge |
||||
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads |
||||
# TYPE go_sched_gomaxprocs_threads gauge |
||||
# HELP go_threads Number of OS threads created. |
||||
# TYPE go_threads gauge |
||||
# HELP node_buddyinfo_blocks Count of free blocks according to size. |
||||
# TYPE node_buddyinfo_blocks gauge |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0 |
||||
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build. |
||||
# TYPE node_exporter_build_info gauge |
||||
# HELP node_memory_size_bytes Total physical memory size |
||||
# TYPE node_memory_size_bytes gauge |
||||
node_memory_size_bytes 6.214455296e+09 |
||||
# HELP node_memory_swap_in_bytes_total Bytes paged in from swap devices |
||||
# TYPE node_memory_swap_in_bytes_total counter |
||||
node_memory_swap_in_bytes_total 0 |
||||
# HELP node_memory_swap_out_bytes_total Bytes paged out to swap devices |
||||
# TYPE node_memory_swap_out_bytes_total counter |
||||
node_memory_swap_out_bytes_total 0 |
||||
# HELP node_memory_swap_size_bytes Total swap memory size |
||||
# TYPE node_memory_swap_size_bytes gauge |
||||
node_memory_swap_size_bytes 1.073741824e+09 |
||||
# HELP node_memory_swap_used_bytes Currently allocated swap |
||||
# TYPE node_memory_swap_used_bytes gauge |
||||
node_memory_swap_used_bytes 0 |
||||
# HELP node_memory_user_wired_bytes Locked in memory by user, mlock, etc |
||||
# TYPE node_memory_user_wired_bytes gauge |
||||
node_memory_user_wired_bytes 0 |
||||
# HELP node_netisr_bindthreads netisr threads bound to CPUs |
||||
# TYPE node_netisr_bindthreads gauge |
||||
node_netisr_bindthreads 0 |
||||
# HELP node_netisr_defaultqlimit netisr default queue limit |
||||
# TYPE node_netisr_defaultqlimit gauge |
||||
node_netisr_defaultqlimit 256 |
||||
# HELP node_netisr_maxprot netisr maximum protocols |
||||
# TYPE node_netisr_maxprot gauge |
||||
node_netisr_maxprot 16 |
||||
# HELP node_netisr_maxqlimit netisr maximum queue limit |
||||
# TYPE node_netisr_maxqlimit gauge |
||||
node_netisr_maxqlimit 10240 |
||||
# HELP node_netisr_maxthreads netisr maximum thread count |
||||
# TYPE node_netisr_maxthreads gauge |
||||
node_netisr_maxthreads 1 |
||||
# HELP node_netisr_numthreads netisr current thread count |
||||
# TYPE node_netisr_numthreads gauge |
||||
node_netisr_numthreads 1 |
||||
# HELP node_network_receive_bytes_total Network device statistic receive_bytes. |
||||
# TYPE node_network_receive_bytes_total counter |
||||
# HELP node_network_receive_drop_total Network device statistic receive_drop. |
||||
# TYPE node_network_receive_drop_total counter |
||||
node_network_receive_drop_total{device="lo0"} 0 |
||||
# HELP node_network_receive_errs_total Network device statistic receive_errs. |
||||
# TYPE node_network_receive_errs_total counter |
||||
node_network_receive_errs_total{device="lo0"} 0 |
||||
# HELP node_network_receive_multicast_total Network device statistic receive_multicast. |
||||
# TYPE node_network_receive_multicast_total counter |
||||
node_network_receive_multicast_total{device="lo0"} 0 |
||||
# HELP node_network_receive_packets_total Network device statistic receive_packets. |
||||
# TYPE node_network_receive_packets_total counter |
||||
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes. |
||||
# TYPE node_network_transmit_bytes_total counter |
||||
# HELP node_network_transmit_drop_total Network device statistic transmit_drop. |
||||
# TYPE node_network_transmit_drop_total counter |
||||
node_network_transmit_drop_total{device="lo0"} 0 |
||||
# HELP node_network_transmit_errs_total Network device statistic transmit_errs. |
||||
# TYPE node_network_transmit_errs_total counter |
||||
node_network_transmit_errs_total{device="lo0"} 0 |
||||
# HELP node_network_transmit_packets_total Network device statistic transmit_packets. |
||||
# TYPE node_network_transmit_packets_total counter |
||||
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id. |
||||
# TYPE node_os_info gauge |
||||
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1 |
||||
# HELP node_os_version Metric containing the major.minor part of the OS version. |
||||
# TYPE node_os_version gauge |
||||
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04 |
||||
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape. |
||||
# TYPE node_scrape_collector_duration_seconds gauge |
||||
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded. |
||||
# TYPE node_scrape_collector_success gauge |
||||
node_scrape_collector_success{collector="boottime"} 1 |
||||
node_scrape_collector_success{collector="buddyinfo"} 1 |
||||
node_scrape_collector_success{collector="cpu"} 1 |
||||
node_scrape_collector_success{collector="exec"} 1 |
||||
node_scrape_collector_success{collector="loadavg"} 1 |
||||
node_scrape_collector_success{collector="meminfo"} 1 |
||||
node_scrape_collector_success{collector="netdev"} 1 |
||||
node_scrape_collector_success{collector="netisr"} 1 |
||||
node_scrape_collector_success{collector="os"} 1 |
||||
node_scrape_collector_success{collector="textfile"} 1 |
||||
node_scrape_collector_success{collector="time"} 1 |
||||
node_scrape_collector_success{collector="xfrm"} 1 |
||||
node_scrape_collector_success{collector="zfs"} 1 |
||||
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime_seconds gauge |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP node_time_seconds System time in seconds since epoch (1970). |
||||
# TYPE node_time_seconds gauge |
||||
# HELP node_time_zone_offset_seconds System time zone offset in seconds. |
||||
# TYPE node_time_zone_offset_seconds gauge |
||||
# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use |
||||
# TYPE node_xfrm_acquire_error_packets_total counter |
||||
node_xfrm_acquire_error_packets_total 24532 |
||||
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed |
||||
# TYPE node_xfrm_fwd_hdr_error_packets_total counter |
||||
node_xfrm_fwd_hdr_error_packets_total 6654 |
||||
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left |
||||
# TYPE node_xfrm_in_buffer_error_packets_total counter |
||||
node_xfrm_in_buffer_error_packets_total 2 |
||||
# HELP node_xfrm_in_error_packets_total All errors not matched by other |
||||
# TYPE node_xfrm_in_error_packets_total counter |
||||
node_xfrm_in_error_packets_total 1 |
||||
# HELP node_xfrm_in_hdr_error_packets_total Header error |
||||
# TYPE node_xfrm_in_hdr_error_packets_total counter |
||||
node_xfrm_in_hdr_error_packets_total 4 |
||||
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found |
||||
# TYPE node_xfrm_in_no_pols_packets_total counter |
||||
node_xfrm_in_no_pols_packets_total 65432 |
||||
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong |
||||
# TYPE node_xfrm_in_no_states_packets_total counter |
||||
node_xfrm_in_no_states_packets_total 3 |
||||
# HELP node_xfrm_in_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_in_pol_block_packets_total counter |
||||
node_xfrm_in_pol_block_packets_total 100 |
||||
# HELP node_xfrm_in_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_in_pol_error_packets_total counter |
||||
node_xfrm_in_pol_error_packets_total 10000 |
||||
# HELP node_xfrm_in_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_in_state_expired_packets_total counter |
||||
node_xfrm_in_state_expired_packets_total 7 |
||||
# HELP node_xfrm_in_state_invalid_packets_total State is invalid |
||||
# TYPE node_xfrm_in_state_invalid_packets_total counter |
||||
node_xfrm_in_state_invalid_packets_total 55555 |
||||
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch |
||||
# TYPE node_xfrm_in_state_mismatch_packets_total counter |
||||
node_xfrm_in_state_mismatch_packets_total 23451 |
||||
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_in_state_mode_error_packets_total counter |
||||
node_xfrm_in_state_mode_error_packets_total 100 |
||||
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong |
||||
# TYPE node_xfrm_in_state_proto_error_packets_total counter |
||||
node_xfrm_in_state_proto_error_packets_total 40 |
||||
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window |
||||
# TYPE node_xfrm_in_state_seq_error_packets_total counter |
||||
node_xfrm_in_state_seq_error_packets_total 6000 |
||||
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong |
||||
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter |
||||
node_xfrm_in_tmpl_mismatch_packets_total 51 |
||||
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error |
||||
# TYPE node_xfrm_out_bundle_check_error_packets_total counter |
||||
node_xfrm_out_bundle_check_error_packets_total 555 |
||||
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error |
||||
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter |
||||
node_xfrm_out_bundle_gen_error_packets_total 43321 |
||||
# HELP node_xfrm_out_error_packets_total All errors which is not matched others |
||||
# TYPE node_xfrm_out_error_packets_total counter |
||||
node_xfrm_out_error_packets_total 1e+06 |
||||
# HELP node_xfrm_out_no_states_packets_total No state is found |
||||
# TYPE node_xfrm_out_no_states_packets_total counter |
||||
node_xfrm_out_no_states_packets_total 869 |
||||
# HELP node_xfrm_out_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_out_pol_block_packets_total counter |
||||
node_xfrm_out_pol_block_packets_total 43456 |
||||
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead |
||||
# TYPE node_xfrm_out_pol_dead_packets_total counter |
||||
node_xfrm_out_pol_dead_packets_total 7656 |
||||
# HELP node_xfrm_out_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_out_pol_error_packets_total counter |
||||
node_xfrm_out_pol_error_packets_total 1454 |
||||
# HELP node_xfrm_out_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_out_state_expired_packets_total counter |
||||
node_xfrm_out_state_expired_packets_total 565 |
||||
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired |
||||
# TYPE node_xfrm_out_state_invalid_packets_total counter |
||||
node_xfrm_out_state_invalid_packets_total 28765 |
||||
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_out_state_mode_error_packets_total counter |
||||
node_xfrm_out_state_mode_error_packets_total 8 |
||||
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error |
||||
# TYPE node_xfrm_out_state_proto_error_packets_total counter |
||||
node_xfrm_out_state_proto_error_packets_total 4542 |
||||
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow |
||||
# TYPE node_xfrm_out_state_seq_error_packets_total counter |
||||
node_xfrm_out_state_seq_error_packets_total 543 |
||||
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler. |
||||
# TYPE promhttp_metric_handler_errors_total counter |
||||
promhttp_metric_handler_errors_total{cause="encoding"} 0 |
||||
promhttp_metric_handler_errors_total{cause="gathering"} 0 |
||||
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served. |
||||
# TYPE promhttp_metric_handler_requests_in_flight gauge |
||||
promhttp_metric_handler_requests_in_flight 1 |
||||
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code. |
||||
# TYPE promhttp_metric_handler_requests_total counter |
||||
promhttp_metric_handler_requests_total{code="200"} 0 |
||||
promhttp_metric_handler_requests_total{code="500"} 0 |
||||
promhttp_metric_handler_requests_total{code="503"} 0 |
||||
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_1 untyped |
||||
testmetric1_1{foo="bar"} 10 |
||||
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_2 untyped |
||||
testmetric1_2{foo="baz"} 20 |
||||
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_1 untyped |
||||
testmetric2_1{foo="bar"} 30 |
||||
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_2 untyped |
||||
testmetric2_2{foo="baz"} 40 |
||||
@ -0,0 +1,212 @@ |
||||
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles. |
||||
# TYPE go_gc_duration_seconds summary |
||||
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent |
||||
# TYPE go_gc_gogc_percent gauge |
||||
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes |
||||
# TYPE go_gc_gomemlimit_bytes gauge |
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
# HELP go_info Information about the Go environment. |
||||
# TYPE go_info gauge |
||||
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_alloc_bytes gauge |
||||
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes. |
||||
# TYPE go_memstats_alloc_bytes_total counter |
||||
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes. |
||||
# TYPE go_memstats_buck_hash_sys_bytes gauge |
||||
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_frees_total counter |
||||
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes. |
||||
# TYPE go_memstats_gc_sys_bytes gauge |
||||
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_heap_alloc_bytes gauge |
||||
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_idle_bytes gauge |
||||
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes |
||||
# TYPE go_memstats_heap_inuse_bytes gauge |
||||
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects. |
||||
# TYPE go_memstats_heap_objects gauge |
||||
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes. |
||||
# TYPE go_memstats_heap_released_bytes gauge |
||||
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_sys_bytes gauge |
||||
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection. |
||||
# TYPE go_memstats_last_gc_time_seconds gauge |
||||
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_mallocs_total counter |
||||
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes. |
||||
# TYPE go_memstats_mcache_inuse_bytes gauge |
||||
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes. |
||||
# TYPE go_memstats_mcache_sys_bytes gauge |
||||
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes. |
||||
# TYPE go_memstats_mspan_inuse_bytes gauge |
||||
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes. |
||||
# TYPE go_memstats_mspan_sys_bytes gauge |
||||
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes. |
||||
# TYPE go_memstats_next_gc_bytes gauge |
||||
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes. |
||||
# TYPE go_memstats_other_sys_bytes gauge |
||||
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes. |
||||
# TYPE go_memstats_stack_inuse_bytes gauge |
||||
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes. |
||||
# TYPE go_memstats_stack_sys_bytes gauge |
||||
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte. |
||||
# TYPE go_memstats_sys_bytes gauge |
||||
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads |
||||
# TYPE go_sched_gomaxprocs_threads gauge |
||||
# HELP go_threads Number of OS threads created. |
||||
# TYPE go_threads gauge |
||||
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build. |
||||
# TYPE node_exporter_build_info gauge |
||||
# HELP node_memory_size_bytes Memory information field size_bytes. |
||||
# TYPE node_memory_size_bytes gauge |
||||
node_memory_size_bytes 6.218080256e+09 |
||||
# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes. |
||||
# TYPE node_memory_swap_size_bytes gauge |
||||
node_memory_swap_size_bytes 6.442426368e+09 |
||||
# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes. |
||||
# TYPE node_memory_swap_used_bytes gauge |
||||
node_memory_swap_used_bytes 0 |
||||
# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total. |
||||
# TYPE node_memory_swapped_in_pages_bytes_total counter |
||||
node_memory_swapped_in_pages_bytes_total 0 |
||||
# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total. |
||||
# TYPE node_memory_swapped_out_pages_bytes_total counter |
||||
node_memory_swapped_out_pages_bytes_total 0 |
||||
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id. |
||||
# TYPE node_os_info gauge |
||||
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1 |
||||
# HELP node_os_version Metric containing the major.minor part of the OS version. |
||||
# TYPE node_os_version gauge |
||||
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04 |
||||
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape. |
||||
# TYPE node_scrape_collector_duration_seconds gauge |
||||
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded. |
||||
# TYPE node_scrape_collector_success gauge |
||||
node_scrape_collector_success{collector="boottime"} 1 |
||||
node_scrape_collector_success{collector="cpu"} 0 |
||||
node_scrape_collector_success{collector="loadavg"} 1 |
||||
node_scrape_collector_success{collector="meminfo"} 1 |
||||
node_scrape_collector_success{collector="os"} 1 |
||||
node_scrape_collector_success{collector="textfile"} 1 |
||||
node_scrape_collector_success{collector="time"} 1 |
||||
node_scrape_collector_success{collector="xfrm"} 1 |
||||
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime_seconds gauge |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP node_time_seconds System time in seconds since epoch (1970). |
||||
# TYPE node_time_seconds gauge |
||||
# HELP node_time_zone_offset_seconds System time zone offset in seconds. |
||||
# TYPE node_time_zone_offset_seconds gauge |
||||
# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use |
||||
# TYPE node_xfrm_acquire_error_packets_total counter |
||||
node_xfrm_acquire_error_packets_total 24532 |
||||
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed |
||||
# TYPE node_xfrm_fwd_hdr_error_packets_total counter |
||||
node_xfrm_fwd_hdr_error_packets_total 6654 |
||||
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left |
||||
# TYPE node_xfrm_in_buffer_error_packets_total counter |
||||
node_xfrm_in_buffer_error_packets_total 2 |
||||
# HELP node_xfrm_in_error_packets_total All errors not matched by other |
||||
# TYPE node_xfrm_in_error_packets_total counter |
||||
node_xfrm_in_error_packets_total 1 |
||||
# HELP node_xfrm_in_hdr_error_packets_total Header error |
||||
# TYPE node_xfrm_in_hdr_error_packets_total counter |
||||
node_xfrm_in_hdr_error_packets_total 4 |
||||
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found |
||||
# TYPE node_xfrm_in_no_pols_packets_total counter |
||||
node_xfrm_in_no_pols_packets_total 65432 |
||||
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong |
||||
# TYPE node_xfrm_in_no_states_packets_total counter |
||||
node_xfrm_in_no_states_packets_total 3 |
||||
# HELP node_xfrm_in_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_in_pol_block_packets_total counter |
||||
node_xfrm_in_pol_block_packets_total 100 |
||||
# HELP node_xfrm_in_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_in_pol_error_packets_total counter |
||||
node_xfrm_in_pol_error_packets_total 10000 |
||||
# HELP node_xfrm_in_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_in_state_expired_packets_total counter |
||||
node_xfrm_in_state_expired_packets_total 7 |
||||
# HELP node_xfrm_in_state_invalid_packets_total State is invalid |
||||
# TYPE node_xfrm_in_state_invalid_packets_total counter |
||||
node_xfrm_in_state_invalid_packets_total 55555 |
||||
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch |
||||
# TYPE node_xfrm_in_state_mismatch_packets_total counter |
||||
node_xfrm_in_state_mismatch_packets_total 23451 |
||||
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_in_state_mode_error_packets_total counter |
||||
node_xfrm_in_state_mode_error_packets_total 100 |
||||
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong |
||||
# TYPE node_xfrm_in_state_proto_error_packets_total counter |
||||
node_xfrm_in_state_proto_error_packets_total 40 |
||||
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window |
||||
# TYPE node_xfrm_in_state_seq_error_packets_total counter |
||||
node_xfrm_in_state_seq_error_packets_total 6000 |
||||
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong |
||||
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter |
||||
node_xfrm_in_tmpl_mismatch_packets_total 51 |
||||
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error |
||||
# TYPE node_xfrm_out_bundle_check_error_packets_total counter |
||||
node_xfrm_out_bundle_check_error_packets_total 555 |
||||
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error |
||||
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter |
||||
node_xfrm_out_bundle_gen_error_packets_total 43321 |
||||
# HELP node_xfrm_out_error_packets_total All errors which is not matched others |
||||
# TYPE node_xfrm_out_error_packets_total counter |
||||
node_xfrm_out_error_packets_total 1e+06 |
||||
# HELP node_xfrm_out_no_states_packets_total No state is found |
||||
# TYPE node_xfrm_out_no_states_packets_total counter |
||||
node_xfrm_out_no_states_packets_total 869 |
||||
# HELP node_xfrm_out_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_out_pol_block_packets_total counter |
||||
node_xfrm_out_pol_block_packets_total 43456 |
||||
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead |
||||
# TYPE node_xfrm_out_pol_dead_packets_total counter |
||||
node_xfrm_out_pol_dead_packets_total 7656 |
||||
# HELP node_xfrm_out_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_out_pol_error_packets_total counter |
||||
node_xfrm_out_pol_error_packets_total 1454 |
||||
# HELP node_xfrm_out_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_out_state_expired_packets_total counter |
||||
node_xfrm_out_state_expired_packets_total 565 |
||||
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired |
||||
# TYPE node_xfrm_out_state_invalid_packets_total counter |
||||
node_xfrm_out_state_invalid_packets_total 28765 |
||||
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_out_state_mode_error_packets_total counter |
||||
node_xfrm_out_state_mode_error_packets_total 8 |
||||
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error |
||||
# TYPE node_xfrm_out_state_proto_error_packets_total counter |
||||
node_xfrm_out_state_proto_error_packets_total 4542 |
||||
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow |
||||
# TYPE node_xfrm_out_state_seq_error_packets_total counter |
||||
node_xfrm_out_state_seq_error_packets_total 543 |
||||
# HELP process_open_fds Number of open file descriptors. |
||||
# TYPE process_open_fds gauge |
||||
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler. |
||||
# TYPE promhttp_metric_handler_errors_total counter |
||||
promhttp_metric_handler_errors_total{cause="encoding"} 0 |
||||
promhttp_metric_handler_errors_total{cause="gathering"} 0 |
||||
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served. |
||||
# TYPE promhttp_metric_handler_requests_in_flight gauge |
||||
promhttp_metric_handler_requests_in_flight 1 |
||||
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code. |
||||
# TYPE promhttp_metric_handler_requests_total counter |
||||
promhttp_metric_handler_requests_total{code="200"} 0 |
||||
promhttp_metric_handler_requests_total{code="500"} 0 |
||||
promhttp_metric_handler_requests_total{code="503"} 0 |
||||
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_1 untyped |
||||
testmetric1_1{foo="bar"} 10 |
||||
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_2 untyped |
||||
testmetric1_2{foo="baz"} 20 |
||||
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_1 untyped |
||||
testmetric2_1{foo="bar"} 30 |
||||
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_2 untyped |
||||
testmetric2_2{foo="baz"} 40 |
||||
@ -0,0 +1,285 @@ |
||||
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles. |
||||
# TYPE go_gc_duration_seconds summary |
||||
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent |
||||
# TYPE go_gc_gogc_percent gauge |
||||
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes |
||||
# TYPE go_gc_gomemlimit_bytes gauge |
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
# HELP go_info Information about the Go environment. |
||||
# TYPE go_info gauge |
||||
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_alloc_bytes gauge |
||||
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes. |
||||
# TYPE go_memstats_alloc_bytes_total counter |
||||
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes. |
||||
# TYPE go_memstats_buck_hash_sys_bytes gauge |
||||
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_frees_total counter |
||||
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes. |
||||
# TYPE go_memstats_gc_sys_bytes gauge |
||||
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes. |
||||
# TYPE go_memstats_heap_alloc_bytes gauge |
||||
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_idle_bytes gauge |
||||
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes |
||||
# TYPE go_memstats_heap_inuse_bytes gauge |
||||
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects. |
||||
# TYPE go_memstats_heap_objects gauge |
||||
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes. |
||||
# TYPE go_memstats_heap_released_bytes gauge |
||||
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes. |
||||
# TYPE go_memstats_heap_sys_bytes gauge |
||||
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection. |
||||
# TYPE go_memstats_last_gc_time_seconds gauge |
||||
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects. |
||||
# TYPE go_memstats_mallocs_total counter |
||||
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes. |
||||
# TYPE go_memstats_mcache_inuse_bytes gauge |
||||
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes. |
||||
# TYPE go_memstats_mcache_sys_bytes gauge |
||||
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes. |
||||
# TYPE go_memstats_mspan_inuse_bytes gauge |
||||
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes. |
||||
# TYPE go_memstats_mspan_sys_bytes gauge |
||||
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes. |
||||
# TYPE go_memstats_next_gc_bytes gauge |
||||
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes. |
||||
# TYPE go_memstats_other_sys_bytes gauge |
||||
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes. |
||||
# TYPE go_memstats_stack_inuse_bytes gauge |
||||
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes. |
||||
# TYPE go_memstats_stack_sys_bytes gauge |
||||
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte. |
||||
# TYPE go_memstats_sys_bytes gauge |
||||
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads |
||||
# TYPE go_sched_gomaxprocs_threads gauge |
||||
# HELP go_threads Number of OS threads created. |
||||
# TYPE go_threads gauge |
||||
# HELP node_buddyinfo_blocks Count of free blocks according to size. |
||||
# TYPE node_buddyinfo_blocks gauge |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759 |
||||
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572 |
||||
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791 |
||||
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475 |
||||
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194 |
||||
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45 |
||||
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12 |
||||
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0 |
||||
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0 |
||||
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build. |
||||
# TYPE node_exporter_build_info gauge |
||||
# HELP node_memory_size_bytes Memory information field size_bytes. |
||||
# TYPE node_memory_size_bytes gauge |
||||
node_memory_size_bytes 6.216278016e+09 |
||||
# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes. |
||||
# TYPE node_memory_swap_size_bytes gauge |
||||
node_memory_swap_size_bytes 6.693941248e+09 |
||||
# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes. |
||||
# TYPE node_memory_swap_used_bytes gauge |
||||
node_memory_swap_used_bytes 0 |
||||
# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total. |
||||
# TYPE node_memory_swapped_in_pages_bytes_total counter |
||||
node_memory_swapped_in_pages_bytes_total 0 |
||||
# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total. |
||||
# TYPE node_memory_swapped_out_pages_bytes_total counter |
||||
node_memory_swapped_out_pages_bytes_total 0 |
||||
# HELP node_network_noproto_total Network device statistic noproto. |
||||
# TYPE node_network_noproto_total counter |
||||
node_network_noproto_total{device="lo0"} 0 |
||||
node_network_noproto_total{device="pflog0"} 0 |
||||
# HELP node_network_receive_bytes_total Network device statistic receive_bytes. |
||||
# TYPE node_network_receive_bytes_total counter |
||||
# HELP node_network_receive_drop_total Network device statistic receive_drop. |
||||
# TYPE node_network_receive_drop_total counter |
||||
node_network_receive_drop_total{device="lo0"} 0 |
||||
node_network_receive_drop_total{device="pflog0"} 0 |
||||
# HELP node_network_receive_errs_total Network device statistic receive_errs. |
||||
# TYPE node_network_receive_errs_total counter |
||||
node_network_receive_errs_total{device="lo0"} 0 |
||||
node_network_receive_errs_total{device="pflog0"} 0 |
||||
# HELP node_network_receive_multicast_total Network device statistic receive_multicast. |
||||
# TYPE node_network_receive_multicast_total counter |
||||
node_network_receive_multicast_total{device="lo0"} 0 |
||||
node_network_receive_multicast_total{device="pflog0"} 0 |
||||
# HELP node_network_receive_packets_total Network device statistic receive_packets. |
||||
# TYPE node_network_receive_packets_total counter |
||||
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes. |
||||
# TYPE node_network_transmit_bytes_total counter |
||||
# HELP node_network_transmit_colls_total Network device statistic transmit_colls. |
||||
# TYPE node_network_transmit_colls_total counter |
||||
node_network_transmit_colls_total{device="lo0"} 0 |
||||
node_network_transmit_colls_total{device="pflog0"} 0 |
||||
# HELP node_network_transmit_drop_total Network device statistic transmit_drop. |
||||
# TYPE node_network_transmit_drop_total counter |
||||
node_network_transmit_drop_total{device="lo0"} 0 |
||||
node_network_transmit_drop_total{device="pflog0"} 0 |
||||
# HELP node_network_transmit_errs_total Network device statistic transmit_errs. |
||||
# TYPE node_network_transmit_errs_total counter |
||||
node_network_transmit_errs_total{device="lo0"} 0 |
||||
node_network_transmit_errs_total{device="pflog0"} 0 |
||||
# HELP node_network_transmit_packets_total Network device statistic transmit_packets. |
||||
# TYPE node_network_transmit_packets_total counter |
||||
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id. |
||||
# TYPE node_os_info gauge |
||||
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1 |
||||
# HELP node_os_version Metric containing the major.minor part of the OS version. |
||||
# TYPE node_os_version gauge |
||||
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04 |
||||
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape. |
||||
# TYPE node_scrape_collector_duration_seconds gauge |
||||
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded. |
||||
# TYPE node_scrape_collector_success gauge |
||||
node_scrape_collector_success{collector="boottime"} 1 |
||||
node_scrape_collector_success{collector="buddyinfo"} 1 |
||||
node_scrape_collector_success{collector="cpu"} 1 |
||||
node_scrape_collector_success{collector="diskstats"} 1 |
||||
node_scrape_collector_success{collector="interrupts"} 1 |
||||
node_scrape_collector_success{collector="loadavg"} 1 |
||||
node_scrape_collector_success{collector="meminfo"} 1 |
||||
node_scrape_collector_success{collector="netdev"} 1 |
||||
node_scrape_collector_success{collector="os"} 1 |
||||
node_scrape_collector_success{collector="textfile"} 1 |
||||
node_scrape_collector_success{collector="time"} 1 |
||||
node_scrape_collector_success{collector="xfrm"} 1 |
||||
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime_seconds gauge |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP node_time_seconds System time in seconds since epoch (1970). |
||||
# TYPE node_time_seconds gauge |
||||
# HELP node_time_zone_offset_seconds System time zone offset in seconds. |
||||
# TYPE node_time_zone_offset_seconds gauge |
||||
# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use |
||||
# TYPE node_xfrm_acquire_error_packets_total counter |
||||
node_xfrm_acquire_error_packets_total 24532 |
||||
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed |
||||
# TYPE node_xfrm_fwd_hdr_error_packets_total counter |
||||
node_xfrm_fwd_hdr_error_packets_total 6654 |
||||
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left |
||||
# TYPE node_xfrm_in_buffer_error_packets_total counter |
||||
node_xfrm_in_buffer_error_packets_total 2 |
||||
# HELP node_xfrm_in_error_packets_total All errors not matched by other |
||||
# TYPE node_xfrm_in_error_packets_total counter |
||||
node_xfrm_in_error_packets_total 1 |
||||
# HELP node_xfrm_in_hdr_error_packets_total Header error |
||||
# TYPE node_xfrm_in_hdr_error_packets_total counter |
||||
node_xfrm_in_hdr_error_packets_total 4 |
||||
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found |
||||
# TYPE node_xfrm_in_no_pols_packets_total counter |
||||
node_xfrm_in_no_pols_packets_total 65432 |
||||
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong |
||||
# TYPE node_xfrm_in_no_states_packets_total counter |
||||
node_xfrm_in_no_states_packets_total 3 |
||||
# HELP node_xfrm_in_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_in_pol_block_packets_total counter |
||||
node_xfrm_in_pol_block_packets_total 100 |
||||
# HELP node_xfrm_in_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_in_pol_error_packets_total counter |
||||
node_xfrm_in_pol_error_packets_total 10000 |
||||
# HELP node_xfrm_in_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_in_state_expired_packets_total counter |
||||
node_xfrm_in_state_expired_packets_total 7 |
||||
# HELP node_xfrm_in_state_invalid_packets_total State is invalid |
||||
# TYPE node_xfrm_in_state_invalid_packets_total counter |
||||
node_xfrm_in_state_invalid_packets_total 55555 |
||||
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch |
||||
# TYPE node_xfrm_in_state_mismatch_packets_total counter |
||||
node_xfrm_in_state_mismatch_packets_total 23451 |
||||
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_in_state_mode_error_packets_total counter |
||||
node_xfrm_in_state_mode_error_packets_total 100 |
||||
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong |
||||
# TYPE node_xfrm_in_state_proto_error_packets_total counter |
||||
node_xfrm_in_state_proto_error_packets_total 40 |
||||
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window |
||||
# TYPE node_xfrm_in_state_seq_error_packets_total counter |
||||
node_xfrm_in_state_seq_error_packets_total 6000 |
||||
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong |
||||
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter |
||||
node_xfrm_in_tmpl_mismatch_packets_total 51 |
||||
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error |
||||
# TYPE node_xfrm_out_bundle_check_error_packets_total counter |
||||
node_xfrm_out_bundle_check_error_packets_total 555 |
||||
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error |
||||
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter |
||||
node_xfrm_out_bundle_gen_error_packets_total 43321 |
||||
# HELP node_xfrm_out_error_packets_total All errors which is not matched others |
||||
# TYPE node_xfrm_out_error_packets_total counter |
||||
node_xfrm_out_error_packets_total 1e+06 |
||||
# HELP node_xfrm_out_no_states_packets_total No state is found |
||||
# TYPE node_xfrm_out_no_states_packets_total counter |
||||
node_xfrm_out_no_states_packets_total 869 |
||||
# HELP node_xfrm_out_pol_block_packets_total Policy discards |
||||
# TYPE node_xfrm_out_pol_block_packets_total counter |
||||
node_xfrm_out_pol_block_packets_total 43456 |
||||
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead |
||||
# TYPE node_xfrm_out_pol_dead_packets_total counter |
||||
node_xfrm_out_pol_dead_packets_total 7656 |
||||
# HELP node_xfrm_out_pol_error_packets_total Policy error |
||||
# TYPE node_xfrm_out_pol_error_packets_total counter |
||||
node_xfrm_out_pol_error_packets_total 1454 |
||||
# HELP node_xfrm_out_state_expired_packets_total State is expired |
||||
# TYPE node_xfrm_out_state_expired_packets_total counter |
||||
node_xfrm_out_state_expired_packets_total 565 |
||||
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired |
||||
# TYPE node_xfrm_out_state_invalid_packets_total counter |
||||
node_xfrm_out_state_invalid_packets_total 28765 |
||||
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error |
||||
# TYPE node_xfrm_out_state_mode_error_packets_total counter |
||||
node_xfrm_out_state_mode_error_packets_total 8 |
||||
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error |
||||
# TYPE node_xfrm_out_state_proto_error_packets_total counter |
||||
node_xfrm_out_state_proto_error_packets_total 4542 |
||||
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow |
||||
# TYPE node_xfrm_out_state_seq_error_packets_total counter |
||||
node_xfrm_out_state_seq_error_packets_total 543 |
||||
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler. |
||||
# TYPE promhttp_metric_handler_errors_total counter |
||||
promhttp_metric_handler_errors_total{cause="encoding"} 0 |
||||
promhttp_metric_handler_errors_total{cause="gathering"} 0 |
||||
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served. |
||||
# TYPE promhttp_metric_handler_requests_in_flight gauge |
||||
promhttp_metric_handler_requests_in_flight 1 |
||||
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code. |
||||
# TYPE promhttp_metric_handler_requests_total counter |
||||
promhttp_metric_handler_requests_total{code="200"} 0 |
||||
promhttp_metric_handler_requests_total{code="500"} 0 |
||||
promhttp_metric_handler_requests_total{code="503"} 0 |
||||
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_1 untyped |
||||
testmetric1_1{foo="bar"} 10 |
||||
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_2 untyped |
||||
testmetric1_2{foo="baz"} 20 |
||||
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_1 untyped |
||||
testmetric2_1{foo="bar"} 30 |
||||
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_2 untyped |
||||
testmetric2_2{foo="baz"} 40 |
||||
@ -0,0 +1,67 @@ |
||||
// Copyright 2024 The Prometheus Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main |
||||
|
||||
import ( |
||||
"fmt" |
||||
"go/build" |
||||
"os" |
||||
"path/filepath" |
||||
"runtime" |
||||
|
||||
"github.com/spf13/cobra" |
||||
) |
||||
|
||||
func main() { |
||||
var rootCmd = &cobra.Command{} |
||||
|
||||
var matchCmd = &cobra.Command{ |
||||
Use: "match [file]", |
||||
Short: "Check whether the file matches the context.", |
||||
Args: cobra.ExactArgs(1), |
||||
Run: func(cmd *cobra.Command, args []string) { |
||||
// For debugging purposes, allow overriding these.
|
||||
goos, found := os.LookupEnv("GOHOSTOS") |
||||
if !found { |
||||
goos = runtime.GOOS |
||||
} |
||||
goarch, found := os.LookupEnv("GOARCH") |
||||
if !found { |
||||
goarch = runtime.GOARCH |
||||
} |
||||
ctx := build.Context{ |
||||
GOOS: goos, |
||||
GOARCH: goarch, |
||||
} |
||||
abs, err := filepath.Abs(args[0]) |
||||
if err != nil { |
||||
panic(err) |
||||
} |
||||
match, err := ctx.MatchFile(filepath.Dir(abs), filepath.Base(abs)) |
||||
if err != nil { |
||||
fmt.Println("Error:", err) |
||||
os.Exit(1) |
||||
} |
||||
if match { |
||||
os.Exit(0) |
||||
} |
||||
os.Exit(1) |
||||
}, |
||||
} |
||||
|
||||
rootCmd.AddCommand(matchCmd) |
||||
if err := rootCmd.Execute(); err != nil { |
||||
os.Exit(1) |
||||
} |
||||
} |
||||
Loading…
Reference in new issue