Skip to content

Commit a7d1374

Browse files
committed
Update to infra_publish_java 2.2.8. Small updates to README, POM, logging.
1 parent e8c5d67 commit a7d1374

File tree

6 files changed

+13
-21
lines changed

6 files changed

+13
-21
lines changed

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ System-Level Monitoring for AIX, Linux, OSX/MacOS & Solaris/SunOS
99
* [Contributing](#Contributing)
1010
* [Requirements](#requirements)
1111
* [Supported OSes](#supported-oses)
12-
* [Installation & Usage Overview](#installation-usage-overview)
12+
* [Installation & Usage Overview](#installation--usage-overview)
1313
* [`plugin.json` configuration](#pluginjson-configuration)
1414
* [Global settings](#global-settings)
15-
* [Using the EU Data Center? Click here!](#eu-data-center)
15+
* [Using the EU Data Center? Click here!](#global-settings)
1616
* [Agent settings](#agent-settings)
1717
* [Proxy settings](#proxy-settings)
1818
* [Dashboard deployment](#dashboard-deployment)
1919
* [Other configurations](#other-configurations)
20-
* [Deploying Dashboards from separate server/desktop](#deploying-dashboards-from-separate-serverdesktop)
20+
* [Deploying Dashboards from separate server or desktop](#deploying-dashboards-from-separate-server-or-desktop)
2121
* [Fix for using the WebSphere JDK](#fix-for-using-the-websphere-jdk)
2222
* [Enabling Debug Mode](#debug-mode)
2323

@@ -70,7 +70,7 @@ _Note: A full example of the possible fields in `plugin.json` can be found in `p
7070
### Agent settings
7171
These settings are found in the `agents` object.
7272

73-
* `name`: If set to `auto`, the plugin will use that server's hostname. Otherwise, sets the hostname and agentName to whatever is set here.
73+
* `name`: If set to `auto`, the plugin will use that server's hostname. Otherwise, sets the hostname and agentName to whatever is set here.
7474
* `static` (optional): An object containing static attributes (as name-value pairs) you want to appear in every event from this plugin. For example:
7575
```json
7676
"agents": [
@@ -79,7 +79,7 @@ These settings are found in the `agents` object.
7979
"static": {
8080
"data_center": "Philadelphia",
8181
"customer": "Eagles",
82-
"rank": 1
82+
"rank": 1
8383
}
8484
}
8585
]
@@ -109,7 +109,7 @@ If you don't want the dashboard deployment to run at startup, leave `admin_api_k
109109

110110
## Other configurations
111111

112-
### Deploying Dashboards from separate server/desktop
112+
### Deploying Dashboards from separate server or desktop
113113
If you want to initiate the dashboard install from a standalone machine (i.e. a tools server or your own mac, linux or cygwin laptop/desktop), you will need the following:
114114

115115
* `pluginctl.sh`
@@ -159,4 +159,3 @@ Note: You will need to restart the Unix Monitor to pick up these changes.
159159
1. Remove `"debug": true` from `config/plugin.json` or change to `"debug": false`
160160
2. Replace `config/logback.xml` with `config/logback-info.xml`
161161
3. Restart Unix Monitor
162-

config/logback-debug.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<MaxFileSize>10MB</MaxFileSize>
2828
</triggeringPolicy>
2929
</appender>
30-
<logger name="com.newrelic.infra" level="DEBUG" additivity="false">
30+
<logger name="com.newrelic" level="DEBUG" additivity="false">
3131
<appender-ref ref="FILE" />
3232
</logger>
3333
<root level="ERROR">

config/logback-info.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
<MaxFileSize>10MB</MaxFileSize>
2828
</triggeringPolicy>
2929
</appender>
30-
<logger name="com.newrelic.infra" level="INFO" additivity="false">
31-
<appender-ref ref="FILE" />
32-
</logger>
33-
<logger name="com.newrelic.infra.publish.insights.InsightsRunner$PollAgentsRunnable" level="ERROR" additivity="false">
30+
<logger name="com.newrelic" level="INFO" additivity="false">
3431
<appender-ref ref="FILE" />
3532
</logger>
3633
<root level="ERROR">

config/logback.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
<MaxFileSize>10MB</MaxFileSize>
2828
</triggeringPolicy>
2929
</appender>
30-
<logger name="com.newrelic.infra" level="INFO" additivity="false">
31-
<appender-ref ref="FILE" />
32-
</logger>
33-
<logger name="com.newrelic.infra.publish.insights.InsightsRunner$PollAgentsRunnable" level="ERROR" additivity="false">
30+
<logger name="com.newrelic" level="INFO" additivity="false">
3431
<appender-ref ref="FILE" />
3532
</logger>
3633
<root level="ERROR">

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.newrelic.experts</groupId>
55
<artifactId>newrelic-unix-monitor</artifactId>
6-
<version>0.1.6</version>
6+
<version>0.1.7</version>
77
<name>newrelic-unix-monitor</name>
88
<build>
99
<plugins>
@@ -67,7 +67,7 @@
6767
<dependency>
6868
<groupId>com.newrelic.experts</groupId>
6969
<artifactId>infra_publish</artifactId>
70-
<version>2.2.2</version>
70+
<version>2.2.8</version>
7171
</dependency>
7272
<dependency>
7373
<groupId>ch.qos.logback</groupId>

src/main/java/com/newrelic/infra/unix/UnixAgent.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.HashMap;
55
import java.util.HashSet;
6-
import java.util.Map;
76
import java.util.regex.Matcher;
87
import java.util.regex.Pattern;
98

@@ -23,15 +22,15 @@ public class UnixAgent extends Agent {
2322
private HashSet<String> disks;
2423
private HashSet<String> networkInterfaces;
2524
private int pageSize;
26-
private Map<String, Long> commandTimestamp;
25+
private HashMap<String, Long> commandTimestamp;
2726

2827
public UnixAgent(AgentSettings asettings) {
2928
agentSettings = asettings;
3029
disks = getMembers(agentSettings.getOsSettings().getDisksCommand(), agentSettings.getOsSettings().getDisksRegex());
3130
networkInterfaces = getMembers(agentSettings.getOsSettings().getInterfacesCommand(), agentSettings.getOsSettings().getInterfacesRegex());
3231
setPageSize(agentSettings);
3332
addStaticAttribute(UnixAgentConstants.KAOSMetricName, agentSettings.getOs().split("_")[0]);
34-
commandTimestamp = new HashMap();
33+
commandTimestamp = new HashMap<String, Long>();
3534
}
3635

3736
// Maintain timestamp for when the command was run last.

0 commit comments

Comments
 (0)