Skip to content

Commit

Permalink
Update to infra_publish_java 2.2.8. Small updates to README, POM, log…
Browse files Browse the repository at this point in the history
…ging.
  • Loading branch information
sschwartzman committed Oct 24, 2019
1 parent e8c5d67 commit a7d1374
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ System-Level Monitoring for AIX, Linux, OSX/MacOS & Solaris/SunOS
* [Contributing](#Contributing)
* [Requirements](#requirements)
* [Supported OSes](#supported-oses)
* [Installation & Usage Overview](#installation-usage-overview)
* [Installation & Usage Overview](#installation--usage-overview)
* [`plugin.json` configuration](#pluginjson-configuration)
* [Global settings](#global-settings)
* [Using the EU Data Center? Click here!](#eu-data-center)
* [Using the EU Data Center? Click here!](#global-settings)
* [Agent settings](#agent-settings)
* [Proxy settings](#proxy-settings)
* [Dashboard deployment](#dashboard-deployment)
* [Other configurations](#other-configurations)
* [Deploying Dashboards from separate server/desktop](#deploying-dashboards-from-separate-serverdesktop)
* [Deploying Dashboards from separate server or desktop](#deploying-dashboards-from-separate-server-or-desktop)
* [Fix for using the WebSphere JDK](#fix-for-using-the-websphere-jdk)
* [Enabling Debug Mode](#debug-mode)

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

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

## Other configurations

### Deploying Dashboards from separate server/desktop
### Deploying Dashboards from separate server or desktop
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:

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

2 changes: 1 addition & 1 deletion config/logback-debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="com.newrelic.infra" level="DEBUG" additivity="false">
<logger name="com.newrelic" level="DEBUG" additivity="false">
<appender-ref ref="FILE" />
</logger>
<root level="ERROR">
Expand Down
5 changes: 1 addition & 4 deletions config/logback-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="com.newrelic.infra" level="INFO" additivity="false">
<appender-ref ref="FILE" />
</logger>
<logger name="com.newrelic.infra.publish.insights.InsightsRunner$PollAgentsRunnable" level="ERROR" additivity="false">
<logger name="com.newrelic" level="INFO" additivity="false">
<appender-ref ref="FILE" />
</logger>
<root level="ERROR">
Expand Down
5 changes: 1 addition & 4 deletions config/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="com.newrelic.infra" level="INFO" additivity="false">
<appender-ref ref="FILE" />
</logger>
<logger name="com.newrelic.infra.publish.insights.InsightsRunner$PollAgentsRunnable" level="ERROR" additivity="false">
<logger name="com.newrelic" level="INFO" additivity="false">
<appender-ref ref="FILE" />
</logger>
<root level="ERROR">
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.newrelic.experts</groupId>
<artifactId>newrelic-unix-monitor</artifactId>
<version>0.1.6</version>
<version>0.1.7</version>
<name>newrelic-unix-monitor</name>
<build>
<plugins>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>com.newrelic.experts</groupId>
<artifactId>infra_publish</artifactId>
<version>2.2.2</version>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/newrelic/infra/unix/UnixAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand All @@ -23,15 +22,15 @@ public class UnixAgent extends Agent {
private HashSet<String> disks;
private HashSet<String> networkInterfaces;
private int pageSize;
private Map<String, Long> commandTimestamp;
private HashMap<String, Long> commandTimestamp;

public UnixAgent(AgentSettings asettings) {
agentSettings = asettings;
disks = getMembers(agentSettings.getOsSettings().getDisksCommand(), agentSettings.getOsSettings().getDisksRegex());
networkInterfaces = getMembers(agentSettings.getOsSettings().getInterfacesCommand(), agentSettings.getOsSettings().getInterfacesRegex());
setPageSize(agentSettings);
addStaticAttribute(UnixAgentConstants.KAOSMetricName, agentSettings.getOs().split("_")[0]);
commandTimestamp = new HashMap();
commandTimestamp = new HashMap<String, Long>();
}

// Maintain timestamp for when the command was run last.
Expand Down

0 comments on commit a7d1374

Please sign in to comment.