| 1 | package pmi |
| 2 | |
| 3 | import ( |
| 4 | "github.com/netdata/netdata/go/plugins/pkg/confopt" |
| 5 | "github.com/netdata/netdata/go/plugins/pkg/web" |
| 6 | "github.com/netdata/netdata/go/plugins/plugin/ibm.d/framework" |
| 7 | ) |
| 8 | |
| 9 | // Config defines the user-facing configuration for the WebSphere PMI module. |
| 10 | // Each field participates in the autogenerated documentation, so keep the |
| 11 | // comments concise but explicit about behaviour and defaults. |
| 12 | type Config struct { |
| 13 | framework.Config `yaml:",inline" json:",inline"` |
| 14 | web.HTTPConfig `yaml:",inline" json:",inline"` |
| 15 | |
| 16 | // Vnode allows binding the collector to a virtual node. |
| 17 | Vnode string `yaml:"vnode,omitempty" json:"vnode" ui:"group:Connection"` |
| 18 | |
| 19 | // PMIStatsType selects which PMI statistics tier to request (`basic`, `extended`, `all`, or `custom`). |
| 20 | PMIStatsType string `yaml:"pmi_stats_type,omitempty" json:"pmi_stats_type" ui:"group:PMI Settings"` |
| 21 | |
| 22 | // PMIRefreshRate overrides the global PMI servlet refresh interval in seconds when a value >0 is provided. |
| 23 | PMIRefreshRate int `yaml:"pmi_refresh_rate,omitempty" json:"pmi_refresh_rate" ui:"group:PMI Settings"` |
| 24 | |
| 25 | // PMICustomStatsPaths adds extra PMI XML paths when `pmi_stats_type` is set to `custom`. |
| 26 | PMICustomStatsPaths []string `yaml:"pmi_custom_stats_paths,omitempty" json:"pmi_custom_stats_paths" ui:"group:PMI Settings"` |
| 27 | |
| 28 | // ClusterName appends the WebSphere cluster identifier label to every exported time-series. |
| 29 | ClusterName string `yaml:"cluster_name,omitempty" json:"cluster_name" ui:"group:Identity"` |
| 30 | |
| 31 | // CellName appends the WebSphere cell identifier label to every exported time-series. |
| 32 | CellName string `yaml:"cell_name,omitempty" json:"cell_name" ui:"group:Identity"` |
| 33 | |
| 34 | // NodeName appends the WebSphere node identifier label to every exported time-series. |
| 35 | NodeName string `yaml:"node_name,omitempty" json:"node_name" ui:"group:Identity"` |
| 36 | |
| 37 | // ServerType records the WebSphere server type label (for example `app_server`, `dmgr`, `nodeagent`). |
| 38 | ServerType string `yaml:"server_type,omitempty" json:"server_type" ui:"group:Identity"` |
| 39 | |
| 40 | // CustomLabels adds arbitrary static labels to every time-series (keys and values must be non-empty). |
| 41 | CustomLabels map[string]string `yaml:"custom_labels,omitempty" json:"custom_labels" ui:"group:Identity"` |
| 42 | |
| 43 | // CollectJVMMetrics toggles JVM runtime metrics; defaults to enabled when unset. |
| 44 | CollectJVMMetrics confopt.AutoBool `yaml:"collect_jvm_metrics,omitempty" json:"collect_jvm_metrics" ui:"group:Other Metrics"` |
| 45 | |
| 46 | // CollectThreadPoolMetrics toggles thread-pool metrics; defaults to enabled when unset. |
| 47 | CollectThreadPoolMetrics confopt.AutoBool `yaml:"collect_threadpool_metrics,omitempty" json:"collect_threadpool_metrics" ui:"group:Thread Pools"` |
| 48 | |
| 49 | // CollectJDBCMetrics toggles JDBC connection-pool metrics; defaults to enabled when unset. |
| 50 | CollectJDBCMetrics confopt.AutoBool `yaml:"collect_jdbc_metrics,omitempty" json:"collect_jdbc_metrics" ui:"group:JDBC"` |
| 51 | |
| 52 | // CollectJCAMetrics toggles JCA resource-adapter metrics; defaults to enabled when unset. |
| 53 | CollectJCAMetrics confopt.AutoBool `yaml:"collect_jca_metrics,omitempty" json:"collect_jca_metrics" ui:"group:JCA"` |
| 54 | |
| 55 | // CollectJMSMetrics toggles JMS destination metrics; defaults to enabled when unset. |
| 56 | CollectJMSMetrics confopt.AutoBool `yaml:"collect_jms_metrics,omitempty" json:"collect_jms_metrics" ui:"group:JMS"` |
| 57 | |
| 58 | // CollectWebAppMetrics toggles Web application metrics (includes servlet/session data); defaults to enabled when unset. |
| 59 | CollectWebAppMetrics confopt.AutoBool `yaml:"collect_webapp_metrics,omitempty" json:"collect_webapp_metrics" ui:"group:Applications"` |
| 60 | |
| 61 | // CollectSessionMetrics toggles HTTP session manager metrics; defaults to enabled when unset. |
| 62 | CollectSessionMetrics confopt.AutoBool `yaml:"collect_session_metrics,omitempty" json:"collect_session_metrics" ui:"group:Other Metrics"` |
| 63 | |
| 64 | // CollectTransactionMetrics toggles transaction manager metrics; defaults to enabled when unset. |
| 65 | CollectTransactionMetrics confopt.AutoBool `yaml:"collect_transaction_metrics,omitempty" json:"collect_transaction_metrics" ui:"group:Other Metrics"` |
| 66 | |
| 67 | // CollectClusterMetrics toggles cluster-level health metrics; defaults to enabled when unset. |
| 68 | CollectClusterMetrics confopt.AutoBool `yaml:"collect_cluster_metrics,omitempty" json:"collect_cluster_metrics" ui:"group:Other Metrics"` |
| 69 | |
| 70 | // CollectServletMetrics enables servlet response-time metrics; defaults to enabled when unset (may add high-cardinality charts). |
| 71 | CollectServletMetrics confopt.AutoBool `yaml:"collect_servlet_metrics,omitempty" json:"collect_servlet_metrics" ui:"group:Servlets"` |
| 72 | |
| 73 | // CollectEJBMetrics enables Enterprise Java Bean workload metrics; defaults to enabled when unset. |
| 74 | CollectEJBMetrics confopt.AutoBool `yaml:"collect_ejb_metrics,omitempty" json:"collect_ejb_metrics" ui:"group:EJBs"` |
| 75 | |
| 76 | // CollectJDBCAdvanced enables additional JDBC latency/timing statistics; defaults to disabled when unset. |
| 77 | CollectJDBCAdvanced confopt.AutoBool `yaml:"collect_jdbc_advanced,omitempty" json:"collect_jdbc_advanced" ui:"group:JDBC"` |
| 78 | |
| 79 | // MaxThreadPools caps the number of thread pools charted per server (0 disables the limit). |
| 80 | MaxThreadPools int `yaml:"max_threadpools,omitempty" json:"max_threadpools" ui:"group:Thread Pools"` |
| 81 | |
| 82 | // MaxJDBCPools caps the number of JDBC connection pools charted (0 disables the limit). |
| 83 | MaxJDBCPools int `yaml:"max_jdbc_pools,omitempty" json:"max_jdbc_pools" ui:"group:JDBC"` |
| 84 | |
| 85 | // MaxJCAPools caps the number of JCA resource adapters charted (0 disables the limit). |
| 86 | MaxJCAPools int `yaml:"max_jca_pools,omitempty" json:"max_jca_pools" ui:"group:JCA"` |
| 87 | |
| 88 | // MaxJMSDestinations caps the number of JMS destinations charted (0 disables the limit). |
| 89 | MaxJMSDestinations int `yaml:"max_jms_destinations,omitempty" json:"max_jms_destinations" ui:"group:JMS"` |
| 90 | |
| 91 | // MaxApplications caps the number of web applications charted (0 disables the limit). |
| 92 | MaxApplications int `yaml:"max_applications,omitempty" json:"max_applications" ui:"group:Applications"` |
| 93 | |
| 94 | // MaxServlets caps the number of servlet contexts charted when servlet collection is enabled (0 disables the limit). |
| 95 | MaxServlets int `yaml:"max_servlets,omitempty" json:"max_servlets" ui:"group:Servlets"` |
| 96 | |
| 97 | // MaxEJBs caps the number of Enterprise Java Beans charted (0 disables the limit). |
| 98 | MaxEJBs int `yaml:"max_ejbs,omitempty" json:"max_ejbs" ui:"group:EJBs"` |
| 99 | |
| 100 | // CollectAppsMatching filters Web applications by name using glob patterns (supports `*`, `?`, `!` prefixes). |
| 101 | CollectAppsMatching string `yaml:"collect_apps_matching,omitempty" json:"collect_apps_matching" ui:"group:Applications"` |
| 102 | |
| 103 | // CollectPoolsMatching filters JDBC and JCA pools by name using glob patterns (supports `*`, `?`, `!` prefixes). |
| 104 | CollectPoolsMatching string `yaml:"collect_pools_matching,omitempty" json:"collect_pools_matching" ui:"group:Thread Pools"` |
| 105 | |
| 106 | // CollectJMSMatching filters JMS destinations by name using glob patterns (supports `*`, `?`, `!` prefixes). |
| 107 | CollectJMSMatching string `yaml:"collect_jms_matching,omitempty" json:"collect_jms_matching" ui:"group:JMS"` |
| 108 | |
| 109 | // CollectServletsMatching filters servlet contexts by name using glob patterns (supports `*`, `?`, `!` prefixes). |
| 110 | CollectServletsMatching string `yaml:"collect_servlets_matching,omitempty" json:"collect_servlets_matching" ui:"group:Servlets"` |
| 111 | |
| 112 | // CollectEJBsMatching filters Enterprise Java Beans by name using glob patterns (supports `*`, `?`, `!` prefixes). |
| 113 | CollectEJBsMatching string `yaml:"collect_ejbs_matching,omitempty" json:"collect_ejbs_matching" ui:"group:EJBs"` |
| 114 | } |