Skip to content
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

Bugfix/issue78 issue82 issue83 issue84 issue85 issue86 issue87 metrics names corrections #97

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ This section provides a description of CPU metrics of a running queue manager.
<td>User CPU time - percentage estimate for queue manager</td>
</tr>
<tr>
<td>mq_cpu_system_cpu_time_estimat_percentage</td>
<td>mq_cpu_system_cpu_time_estimate_percentage</td>
<td>gauge</td>
<td>Estimates the percentage of CPU use in system state for processes that are related to the queue managers that are being monitored</td>
<td>System CPU time - percentage estimate for queue manager</td>
Expand Down Expand Up @@ -646,7 +646,7 @@ This section provides a description of metrics related to MQCONN and MQDISC call
<td>Failed MQCONN/MQCONNX count</td>
</tr>
<tr>
<td>mq_mqconn_concurrent_connections_high_water_mark_totalconnections</td>
<td>mq_mqconn_concurrent_connections_high_water_mark_connections</td>
<td>gauge</td>
<td>Shows the maximum number of concurrent connections in the current statistics interval.</td>
<td>Concurrent connections - high water mark</td>
Expand Down Expand Up @@ -796,13 +796,13 @@ This section provides a description of metrics related to MQPUT, MQPUT1 and MQST
<td>Failed MQPUT1 count</td>
</tr>
<tr>
<td>mq_put_put_non_persistent_messages_byte_count_totalmessages</td>
<td>mq_put_put_non_persistent_messages_byte_count_totalbytes</td>
<td>counter</td>
<td>Shows the number of bytes put in non-persistent messages.</td>
<td>Put non-persistent messages - byte count</td>
</tr>
<tr>
<td>mq_put_put_persistent_messages_byte_count_totalmessages</td>
<td>mq_put_put_persistent_messages_byte_count_totalbytes</td>
<td>counter</td>
<td>Shows the number of bytes put in persistent messages.</td>
<td>Put persistent messages - byte count</td>
Expand Down Expand Up @@ -907,7 +907,7 @@ This section provides a description of metrics related to MQGET, MQCB and MQCTL
<td>Expired message count</td>
</tr>
<tr>
<td>mq_get_purged_queue_count_totalmessages</td>
<td>mq_queue_purged_queue_count_totalqueues</td>
<td>counter</td>
<td>Shows a count of queues that have been purged.</td>
<td>Purged queue count</td>
Expand Down Expand Up @@ -1089,7 +1089,7 @@ This section provides a description of metrics related to publications of a que
<td>Published to subscribers - message count</td>
</tr>
<tr>
<td>mq_publish_published_to_subscribers_byte_count_totalmessages</td>
<td>mq_publish_published_to_subscribers_byte_count_totalbytes</td>
<td>counter</td>
<td>Shows the byte count of messages that are published to subscribers.</td>
<td>Published to subscribers - byte count</td>
Expand Down Expand Up @@ -1362,12 +1362,12 @@ This section provides a description of metrics of queues, channels and listeners
<td>Shows maximum number of messages that are allowed on the queue.</td>
</tr>
<tr>
<td>mqobject_channel_channel_status_code</td>
<td>mqobject_channel_channel_status_hundredths</td>
<td>gauge</td>
<td>Shows current channel status. Mapping of channel statuses to prometheus metric values can be found <a href="#channel-status-mapping">here</a>.</td>
</tr>
<tr>
<td>mqobject_listener_listener_status_code</td>
<td>mqobject_listener_listener_status_hundredths</td>
<td>gauge</td>
<td>Shows current listener status. Mapping of listener statuses to prometheus metric values can be found <a href="#listener-status-mapping">here</a>.</td>
</tr>
Expand All @@ -1386,47 +1386,47 @@ This section provides a mapping between MQ channel statuses and metric values, t
</tr>
<tr>
<td>RUNNING</td>
<td>1</td>
<td>100</td>
</tr>
<tr>
<td>REQUESTING</td>
<td>0.8</td>
<td>90</td>
</tr>
<tr>
<td>PAUSED</td>
<td>0.7</td>
<td>80</td>
</tr>
<tr>
<td>BINDING</td>
<td>0.6</td>
<td>70</td>
</tr>
<tr>
<td>STARTING</td>
<td>0.5</td>
<td>60</td>
</tr>
<tr>
<td>INITIALIZING</td>
<td>0.4</td>
<td>50</td>
</tr>
<tr>
<td>SWITCHING</td>
<td>0.3</td>
<td>40</td>
</tr>
<tr>
<td>STOPPING</td>
<td>0.2</td>
<td>30</td>
</tr>
<tr>
<td>RETRYING</td>
<td>0.1</td>
<td>20</td>
</tr>
<tr>
<td>STOPPED</td>
<td>0</td>
<td>10</td>
</tr>
<tr>
<td>INACTIVE</td>
<td>-1</td>
<td>0</td>
</tr>
</tbody>
</table>
Expand All @@ -1444,15 +1444,15 @@ This section provides a mapping between MQ listener statuses and metric values,
</tr>
<tr>
<td>RUNNING</td>
<td>1</td>
<td>100</td>
</tr>
<tr>
<td>STARTING</td>
<td>0.75</td>
<td>75</td>
</tr>
<tr>
<td>STOPPING</td>
<td>0.5</td>
<td>50</td>
</tr>
<tr>
<td>STOPPED</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
metrics.put("RAM free percentage", new Metric("system_ram_ram_free_percentage", Metric.Type.SIMPLE_GAUGE));
metrics.put("RAM total bytes", new Metric("system_ram_ram_total_megabytes", Metric.Type.SIMPLE_GAUGE));
metrics.put("User CPU time - percentage estimate for queue manager", new Metric("mq_cpu_user_cpu_time_estimate_percentage", Metric.Type.SIMPLE_GAUGE));
metrics.put("System CPU time - percentage estimate for queue manager", new Metric("mq_cpu_system_cpu_time_estimat_percentage", Metric.Type.SIMPLE_GAUGE));
metrics.put("System CPU time - percentage estimate for queue manager", new Metric("mq_cpu_system_cpu_time_estimate_percentage", Metric.Type.SIMPLE_GAUGE));
metrics.put("RAM total bytes - estimate for queue manager", new Metric("mq_ram_ram_total_estimate_megabytes", Metric.Type.SIMPLE_GAUGE));
metrics.put("MQ trace file system - bytes in use", new Metric("system_disk_trace_file_system_in_use_megabytes", Metric.Type.SIMPLE_GAUGE));
metrics.put("MQ trace file system - free space", new Metric("system_disk_trace_file_system_free_space_percentage", Metric.Type.SIMPLE_GAUGE));
Expand All @@ -52,7 +52,7 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
metrics.put("Log - write latency", new Metric("mq_rlog_log_write_latency_microseconds", Metric.Type.SIMPLE_GAUGE));
metrics.put("MQCONN/MQCONNX count", new Metric("mq_mqconn_mqconnx_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Failed MQCONN/MQCONNX count", new Metric("mq_mqconn_failed_mqconn_mqconnx_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Concurrent connections - high water mark", new Metric("mq_mqconn_concurrent_connections_high_water_mark_totalconnections", Metric.Type.SIMPLE_GAUGE));
metrics.put("Concurrent connections - high water mark", new Metric("mq_mqconn_concurrent_connections_high_water_mark_connections", Metric.Type.SIMPLE_GAUGE));
metrics.put("MQDISC count", new Metric("mq_mqdisc_mqdisc_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("MQOPEN count", new Metric("mq_mqopen_mqopen_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Failed MQOPEN count", new Metric("mq_mqopen_failed_mqopen_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
Expand All @@ -70,8 +70,8 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
metrics.put("Non-persistent message MQPUT1 count", new Metric("mq_put_non_persistent_message_mqput1_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Persistent message MQPUT1 count", new Metric("mq_put_persistent_message_mqput1_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Failed MQPUT1 count", new Metric("mq_put_failed_mqput1_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Put non-persistent messages - byte count", new Metric("mq_put_put_non_persistent_messages_byte_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Put persistent messages - byte count", new Metric("mq_put_put_persistent_messages_byte_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Put non-persistent messages - byte count", new Metric("mq_put_put_non_persistent_messages_byte_count_totalbytes", Metric.Type.SIMPLE_COUNTER));
metrics.put("Put persistent messages - byte count", new Metric("mq_put_put_persistent_messages_byte_count_totalbytes", Metric.Type.SIMPLE_COUNTER));
metrics.put("MQSTAT count", new Metric("mq_put_mqstat_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Interval total destructive get- count", new Metric("mq_get_interval_total_destructive_get_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Interval total destructive get - byte count", new Metric("mq_get_interval_total_destructive_get_byte_count_totalbytes", Metric.Type.SIMPLE_COUNTER));
Expand All @@ -86,7 +86,7 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
metrics.put("Non-persistent message browse - byte count", new Metric("mq_get_non_persistent_message_browse_byte_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Persistent message browse - byte count", new Metric("mq_get_persistent_message_browse_byte_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Expired message count", new Metric("mq_get_expired_message_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Purged queue count", new Metric("mq_get_purged_queue_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Purged queue count", new Metric("mq_queue_purged_queue_count_totalqueues", Metric.Type.SIMPLE_COUNTER));
metrics.put("MQCB count", new Metric("mq_get_mqcb_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("Failed MQCB count", new Metric("mq_get_failed_mqcb_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
metrics.put("MQCTL count", new Metric("mq_get_mqctl_count_totalcalls", Metric.Type.SIMPLE_COUNTER));
Expand All @@ -109,7 +109,7 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
metrics.put("Topic MQPUT/MQPUT1 interval total", new Metric("mq_publish_topic_mqput_mqput1_interval_total_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Interval total topic bytes put", new Metric("mq_publish_interval_total_topic_bytes_put_totalbytes", Metric.Type.SIMPLE_COUNTER));
metrics.put("Published to subscribers - message count", new Metric("mq_publish_published_to_subscribers_message_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Published to subscribers - byte count", new Metric("mq_publish_published_to_subscribers_byte_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Published to subscribers - byte count", new Metric("mq_publish_published_to_subscribers_byte_count_totalbytes", Metric.Type.SIMPLE_COUNTER));
metrics.put("Non-persistent - topic MQPUT/MQPUT1 count", new Metric("mq_publish_non_persistent_topic_mqput_mqput1_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Persistent - topic MQPUT/MQPUT1 count", new Metric("mq_publish_persistent_topic_mqput_mqput1_count_totalmessages", Metric.Type.SIMPLE_COUNTER));
metrics.put("Failed topic MQPUT/MQPUT1 count", new Metric("mq_publish_failed_topic_mqput_mqput1_count_totalattempts", Metric.Type.SIMPLE_COUNTER));
Expand All @@ -124,8 +124,8 @@ private static HashMap<String, Metric> getQueueManagerMetricsReference() {
private static EnumMap<MQObject.MQType, AdditionalMetric> getMqObjectAdditionalMetricsReference() {
EnumMap<MQObject.MQType, AdditionalMetric> metrics = new EnumMap<>(MQObject.MQType.class);
metrics.put(MQObject.MQType.QUEUE, new AdditionalMetric("mqobject_queue_queue_max_depth_messages", "The maximum number of messages that are allowed on the queue"));
metrics.put(MQObject.MQType.CHANNEL, new AdditionalMetric("mqobject_channel_channel_status_code", "The status of the channel"));
metrics.put(MQObject.MQType.LISTENER, new AdditionalMetric("mqobject_listener_listener_status_code", "The status of the listener"));
metrics.put(MQObject.MQType.CHANNEL, new AdditionalMetric("mqobject_channel_channel_status_hundredths", "The status of the channel"));
metrics.put(MQObject.MQType.LISTENER, new AdditionalMetric("mqobject_listener_listener_status_hundredths", "The status of the listener"));
return metrics;
}

Expand Down Expand Up @@ -175,17 +175,17 @@ private static HashMap<String, Metric> getMqObjectMetricsReference() {
*/
private static HashMap<Integer, Double> getChannelStatuses() {
HashMap<Integer, Double> statuses = new HashMap<>();
statuses.put(MQConstants.MQCHS_RUNNING, (double) 1);
statuses.put(MQConstants.MQCHS_REQUESTING, 0.8);
statuses.put(MQConstants.MQCHS_PAUSED, 0.7);
statuses.put(MQConstants.MQCHS_BINDING, 0.6);
statuses.put(MQConstants.MQCHS_STARTING, 0.5);
statuses.put(MQConstants.MQCHS_INITIALIZING, 0.4);
statuses.put(MQConstants.MQCHS_SWITCHING, 0.3);
statuses.put(MQConstants.MQCHS_STOPPING, 0.2);
statuses.put(MQConstants.MQCHS_RETRYING, 0.1);
statuses.put(MQConstants.MQCHS_STOPPED, (double) 0);
statuses.put(MQConstants.MQCHS_INACTIVE, (double) -1);
statuses.put(MQConstants.MQCHS_RUNNING, 100d);
statuses.put(MQConstants.MQCHS_REQUESTING, 90d);
statuses.put(MQConstants.MQCHS_PAUSED, 80d);
statuses.put(MQConstants.MQCHS_BINDING, 70d);
statuses.put(MQConstants.MQCHS_STARTING, 60d);
statuses.put(MQConstants.MQCHS_INITIALIZING, 50d);
statuses.put(MQConstants.MQCHS_SWITCHING, 40d);
statuses.put(MQConstants.MQCHS_STOPPING, 30d);
statuses.put(MQConstants.MQCHS_RETRYING, 20d);
statuses.put(MQConstants.MQCHS_STOPPED, 10d);
statuses.put(MQConstants.MQCHS_INACTIVE, 0d);
return statuses;
}

Expand All @@ -196,10 +196,10 @@ private static HashMap<Integer, Double> getChannelStatuses() {
*/
private static HashMap<Integer, Double> getListenerStatuses() {
HashMap<Integer, Double> statuses = new HashMap<>();
statuses.put(MQConstants.MQSVC_STATUS_RUNNING, 1.0);
statuses.put(MQConstants.MQSVC_STATUS_STARTING, 0.75);
statuses.put(MQConstants.MQSVC_STATUS_STOPPING, 0.5);
statuses.put(MQConstants.MQSVC_STATUS_STOPPED, 0.0);
statuses.put(MQConstants.MQSVC_STATUS_RUNNING, 100d);
statuses.put(MQConstants.MQSVC_STATUS_STARTING, 75d);
statuses.put(MQConstants.MQSVC_STATUS_STOPPING, 50d);
statuses.put(MQConstants.MQSVC_STATUS_STOPPED, 0d);
return statuses;
}

Expand Down