Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
telegraf-nftables
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Due to inactivity, this project is scheduled to be deleted on 2035-04-24.
Why is this scheduled?
Show more breadcrumbs
vqgroup
telegraf-nftables
Commits
7121e1a3
Commit
7121e1a3
authored
9 years ago
by
Jonathan Cross
Committed by
Cameron Sparr
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixes based on comments
parent
8fd06b96
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/zookeeper/README.md
+62
-0
62 additions, 0 deletions
plugins/zookeeper/README.md
plugins/zookeeper/zookeeper_test.go
+14
-2
14 additions, 2 deletions
plugins/zookeeper/zookeeper_test.go
scripts/docker-compose.yml
+5
-0
5 additions, 0 deletions
scripts/docker-compose.yml
with
81 additions
and
2 deletions
plugins/zookeeper/README.md
0 → 100644
+
62
−
0
View file @
7121e1a3
## Telegraf Plugin: Zookeeper
#### Description
The zookeeper plugin collects variables outputted from the 'mntr' command
[
Zookeeper Admin
](
https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html
)
.
```
echo mntr | nc localhost 2181
zk_version 3.4.0
zk_avg_latency 0
zk_max_latency 0
zk_min_latency 0
zk_packets_received 70
zk_packets_sent 69
zk_outstanding_requests 0
zk_server_state leader
zk_znode_count 4
zk_watch_count 0
zk_ephemerals_count 0
zk_approximate_data_size 27
zk_followers 4 - only exposed by the Leader
zk_synced_followers 4 - only exposed by the Leader
zk_pending_syncs 0 - only exposed by the Leader
zk_open_file_descriptor_count 23 - only available on Unix platforms
zk_max_file_descriptor_count 1024 - only available on Unix platforms
```
## Measurements:
#### Zookeeper measurements:
Meta:
-
units: int64
-
tags:
`server=<hostname> port=<port>`
Measurement names:
-
avg_latency
-
max_latency
-
min_latency
-
packets_received
-
packets_sent
-
outstanding_requests
-
znode_count
-
watch_count
-
ephemerals_count
-
approximate_data_size
-
followers #only exposed by the Leader
-
synced_followers #only exposed by the Leader
-
pending_syncs #only exposed by the Leader
-
open_file_descriptor_count
-
max_file_descriptor_count
#### Zookeeper string measurements:
Meta:
-
units: string
-
tags:
`server=<hostname> port=<port>`
Measurement names:
-
zk_version
-
server_state
\ No newline at end of file
This diff is collapsed.
Click to expand it.
plugins/zookeeper/zookeeper_test.go
+
14
−
2
View file @
7121e1a3
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
func
Test
Memcached
GeneratesMetrics
(
t
*
testing
.
T
)
{
func
Test
Zookeeper
GeneratesMetrics
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
if
testing
.
Short
()
{
t
.
Skip
(
"Skipping integration test in short mode"
)
t
.
Skip
(
"Skipping integration test in short mode"
)
}
}
...
@@ -22,7 +22,19 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
...
@@ -22,7 +22,19 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
err
:=
z
.
Gather
(
&
acc
)
err
:=
z
.
Gather
(
&
acc
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
intMetrics
:=
[]
string
{
"zookeeper_avg_latency"
,
"zookeeper_packets_sent"
,
"zookeeper_znode_count"
,
"zookeeper_open_file_descriptor_count"
,
"zookeeper_max_file_descriptor_count"
}
intMetrics
:=
[]
string
{
"zookeeper_avg_latency"
,
"zookeeper_max_latency"
,
"zookeeper_min_latency"
,
"zookeeper_packets_received"
,
"zookeeper_packets_sent"
,
"zookeeper_outstanding_requests"
,
"zookeeper_znode_count"
,
"zookeeper_watch_count"
,
"zookeeper_ephemerals_count"
,
"zookeeper_approximate_data_size"
,
"zookeeper_pending_syncs"
,
"zookeeper_open_file_descriptor_count"
,
"zookeeper_max_file_descriptor_count"
}
for
_
,
metric
:=
range
intMetrics
{
for
_
,
metric
:=
range
intMetrics
{
assert
.
True
(
t
,
acc
.
HasIntValue
(
metric
),
metric
)
assert
.
True
(
t
,
acc
.
HasIntValue
(
metric
),
metric
)
...
...
This diff is collapsed.
Click to expand it.
scripts/docker-compose.yml
+
5
−
0
View file @
7121e1a3
...
@@ -42,3 +42,8 @@ redis:
...
@@ -42,3 +42,8 @@ redis:
image
:
redis
image
:
redis
ports
:
ports
:
-
"
6379:6379"
-
"
6379:6379"
zookeeper
:
image
:
spotify/kafka
ports
:
-
"
2181:2181"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment