New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metricbeat/RabbitMQ: Adds connections metricset #6458
Metricbeat/RabbitMQ: Adds connections metricset #6458
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
assert.EqualValues(t, 376, packet_count["receive"]) | ||
assert.EqualValues(t, 0, packet_count["pending"]) | ||
|
||
octet_count := event["octet_count"].(common.MapStr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use underscores in Go names; var octet_count should be octetCount
assert.EqualValues(t, 131072, event["frame_max"]) | ||
assert.EqualValues(t, "network", event["type"]) | ||
|
||
packet_count := event["packet_count"].(common.MapStr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use underscores in Go names; var packet_count should be packetCount
mbtest "github.com/elastic/beats/metricbeat/mb/testing" | ||
) | ||
|
||
func TestData(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported function TestData should have comment or be unexported
}, nil | ||
} | ||
|
||
func (m *MetricSet) Fetch() ([]common.MapStr, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method MetricSet.Fetch should have comment or be unexported
*helper.HTTP | ||
} | ||
|
||
func New(base mb.BaseMetricSet) (mb.MetricSet, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported function New should have comment or be unexported
} | ||
} | ||
|
||
type MetricSet struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type MetricSet should have comment or be unexported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
- Could you add an entry to the CHANGELOG.asciidoc?
- Can you make Hound-CI happy?
Left few minor comments.
type: keyword | ||
description: > | ||
Server hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was disabled. | ||
- name: peer_host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this peer.host
and `peer.port?
} | ||
|
||
func New(base mb.BaseMetricSet) (mb.MetricSet, error) { | ||
cfgwarn.Experimental("The rabbitmq connection metricset is experimental") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow docs and code do not align here. In the docs it's marked as beta. I assume that has to do with our generator :-( Could you change this to cfgwarn.Beta
here?
@jaipradeesh One more thing, you could update the PR description with some more descriptive details? |
jenkins, test it |
To update the auto generated files you need to run |
da78b18
to
28e0c18
Compare
|
28e0c18
to
aca9c0a
Compare
|
aca9c0a
to
a5237e6
Compare
@ruflin Help. |
I think the problem is that you forked the project under |
Parallel fork. Fixing. Update: http://dpaste.com/3B6W174 |
I assume |
Update: Removing the above line from |
a5237e6
to
c374fcd
Compare
There should not be a directory |
Removed. Generating JSON. It might take a while. |
You can temporarely adjust the line to
or even as following to gather data from a local rabbitmq instance you have running:
|
Following metrics are added: name - The name of the connection with non-ASCII characters escaped as in C. vhost - Virtual host name with non-ASCII characters escaped as in C. user - User name. node - Node name. channels - The number of channels on the connection. channel_max - The maximum number of channels allowed on the connection. frame_max - Maximum permissible size of a frame (in bytes) to negotiate with clients. type - Type of the connection. host - Server hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was disabled. peer_host - Peer hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was not enabled. peer_port - Peer port. server_port - Server port. packet_count - Number of packets sent, received and pending on the connection. octet_count - Number of octets sent and received on the connection. Signed-off-by: Jaipradeesh <jaipradeesh@gmail.com>
c374fcd
to
9c133af
Compare
@ruflin LGTM. Thanks for the help with onboarding. Let me know. |
jenkins, test it |
@jaipradeesh Thanks for going through this. It's a pleasure to work like this. |
Following metrics are added:
name - The name of the connection with non-ASCII characters escaped as in C.
vhost - Virtual host name with non-ASCII characters escaped as in C.
user - User name.
node - Node name.
channels - The number of channels on the connection.
channel_max - The maximum number of channels allowed on the connection.
frame_max - Maximum permissible size of a frame (in bytes) to negotiate with clients.
type - Type of the connection.
host - Server hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was disabled.
peer_host - Peer hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was not enabled.
peer_port - Peer port.
server_port - Server port.
packet_count - Number of packets sent, received and pending on the connection.
octet_count - Number of octets sent and received on the connection.
Signed-off-by: Jaipradeesh jaipradeesh@gmail.com