You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,10 @@ It also adds the `node-hc` command to another directory tied to your Node.js SDK
105
105
106
106
<aname="config"></a>
107
107
### Configuring Node Application Metrics
108
-
Node Application Metrics comes with a configuration file inside the [module installation directory](#install) (`.../node_modules/appmetrics/appmetrics.properties`). This is used to configure connection options, logging and data source options.
108
+
109
+
Node Application Metrics can be configured in two ways, by using the configuration file described below or via a call to configure(options).
110
+
111
+
Node Application Metrics comes with a configuration file inside the [module installation directory](#install) (`.../node_modules/appmetrics/appmetrics.properties`). This can be used to configure connection options, logging and data source options.
109
112
110
113
Node Application Metrics will attempt to load `appmetrics.properties` from one of the following locations (in order):
111
114
@@ -162,14 +165,26 @@ monitoring.on('cpu', function (cpu) {
162
165
163
166
## Health Center Eclipse IDE client
164
167
### Connecting to the client
165
-
Connecting to the Health Center client requires the additional installation of a MQTT broker. The Node Application Metrics agent sends data to the MQTT broker specified in the `appmetrics.properties` file. Installation and configuration documentation for the Health Center client is available from the [Health Center documentation in IBM Knowledge Center][2].
168
+
Connecting to the Health Center client requires the additional installation of a MQTT broker. The Node Application Metrics agent sends data to the MQTT broker specified in the `appmetrics.properties` file or set via a call to configure(options). Installation and configuration documentation for the Health Center client is available from the [Health Center documentation in IBM Knowledge Center][2].
166
169
167
170
Note that both the API and the Health Center client can be used at the same time and will receive the same data. Use of the API requires a local install and application modification (see *[Modifying your application to use the local installation](#run-local)*).
168
171
169
172
Further information regarding the use of the Health Center client with Node Application Metrics can be found on the [appmetrics wiki][3]: [Using Node Application Metrics with the Health Center client](https://github.com/RuntimeTools/appmetrics/wiki/Using-Node-Application-Metrics-with-the-Health-Center-client).
170
173
171
174
<aname="api-doc"></a>
172
175
## API Documentation
176
+
### appmetrics.configure(options)
177
+
Sets various properties on the appmetrics monitoring agent. If the agent has already been started, this function does nothing.
178
+
*`options`(Object) key value pairs of properties and values to be set on the monitoring agent.
0 commit comments