-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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] Add performance metricset to Oracle module #12547
[Metricbeat] Add performance metricset to Oracle module #12547
Conversation
return port | ||
} | ||
|
||
// GetOracleEnvUsername returns the port of the Oracle server or the value of the environment variable ORACLE_PASSWORD if not empty |
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.
comment on exported function GetOracleEnvPassword should be of the form "GetOracleEnvPassword ..."
@odbaeu pinging you in case you want to contribute with something or add some comments 😉 |
d90fa1c
to
d1ee956
Compare
return s.Valid | ||
} | ||
|
||
func (s *StringValue) Value() interface{} { |
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 StringValue.Value should have comment or be unexported
return i.Int64 | ||
} | ||
|
||
type StringValue 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 StringValue should have comment or be unexported
return i.Valid | ||
} | ||
|
||
func (i *Int64Value) Value() interface{} { |
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 Int64Value.Value should have comment or be unexported
return i.Float64 | ||
} | ||
|
||
type Int64Value 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 Int64Value should have comment or be unexported
return i.Valid | ||
} | ||
|
||
func (i *Float64Value) Value() interface{} { |
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 Float64Value.Value should have comment or be unexported
|
||
type SqlValueWrapper struct { | ||
Field string | ||
SqlValue SqlValue |
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.
struct field SqlValue should be SQLValue
} | ||
} | ||
|
||
type SqlValueWrapper 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 SqlValueWrapper should have comment or be unexported
type SqlValueWrapper should be SQLValueWrapper
return | ||
} | ||
|
||
func NewSqlWrapper(fieldName string, value SqlValue) *SqlValueWrapper { |
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 NewSqlWrapper should have comment or be unexported
func NewSqlWrapper should be NewSQLWrapper
) | ||
|
||
// checkNullString avoid setting an invalid empty string value on Metricbeat event | ||
func CheckNullSqlValue(logger *logp.Logger, output map[string]common.MapStr, parentTargetFieldName, targetFieldName string, v SqlValue) { |
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.
func CheckNullSqlValue should be CheckNullSQLValue
"github.com/elastic/beats/libbeat/logp" | ||
) | ||
|
||
// checkNullString avoid setting an invalid empty string value on Metricbeat event |
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.
comment on exported function CheckNullSqlValue should be of the form "CheckNullSqlValue ..."
Hey @sayden, thank you for pinging me! I very much appreciate that you continue to develop the oracle mb. For me as an experienced Oracle DBA, it's more important to focus monitoring things which cause an outage that performance. But I know that performance monitoring sells much better than availability monitoring :-). When monitoring performance in Oracle we have to be very careful to not query views which belong to the Enterprise Edition Option "Diagnostic" or "Tuning". For example: All view starting with DBA_HIST*, DBA_ADVISOR*, v$active_session_history I was thinking about the metrics above... here are some thoughts:
It's quite late... I hope there are not too many grammar or spelling mistakes... If you find one, you can keep it ;-). |
ff24d8d
to
9fcc315
Compare
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.
This is looking pretty good, you did a good job looking for the queries and adapting the results.
I think it'd be good to add some additional explanations on the queries, to help understand what they do, and on the docs to explain the events that are being generated by the metricset.
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 addressing the comments, thanks to having the example data files I have found a possible problem with mapping conflicts. This would be the only important pending thing.
It would be also nice to automate the collection of data files as suggested, but this can be left for a future change.
x-pack/metricbeat/module/oracle/performance/_meta/cursor_by_username_and_machine_data.json
Outdated
Show resolved
Hide resolved
hitRatio sql.NullFloat64 | ||
} | ||
|
||
/* |
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.
Nit. Not important because they are not exported method, but it'd be nice to follow godocs and start with something like this:
/* | |
/* | |
* bufferCacheHitRatio collects information about the cache hit ratio of an Oracle database server |
Error is unrelated. Merging |
Partially addresses #1935 |
In the performance Metricset of Oracle module a list of key performance metrics for Oracle must be included.
Cursor and cache data are included in this first PR.