Improve logging on discovery.
This commit is contained in:
parent
2d13bddde1
commit
ce42989f1e
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
**HMCi** is a utility that collects metrics from one or more *IBM Power Hardware Management Consoles (HMC)*, without the need to install agents on logical partitions / virtual machines running on the IBM Power systems. The metric data is processed and saved into an InfluxDB time-series database. Grafana is used to visualize the metrics data from InfluxDB through provided dashboards, or your own customized dashboards.
|
**HMCi** is a utility that collects metrics from one or more *IBM Power Hardware Management Consoles (HMC)*, without the need to install agents on logical partitions / virtual machines running on the IBM Power systems. The metric data is processed and saved into an InfluxDB time-series database. Grafana is used to visualize the metrics data from InfluxDB through provided dashboards, or your own customized dashboards.
|
||||||
|
|
||||||
This software is free to use and is licensed under the [Apache 2.0 License](https://bitbucket.org/mnellemann/syslogd/src/master/LICENSE), but is not supported or endorsed by International Business Machines (IBM). There is an optional [companion agent](https://bitbucket.org/mnellemann/sysmon/), which provides more metrics from within AIX and Linux.
|
This software is free to use and is licensed under the [Apache 2.0 License](https://bitbucket.org/mnellemann/hmci/src/master/LICENSE), but is not supported or endorsed by International Business Machines (IBM). There is an optional [companion agent](https://bitbucket.org/mnellemann/sysmon/), which provides more metrics from within AIX and Linux.
|
||||||
|
|
||||||
Metrics includes:
|
Metrics includes:
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ class LogicalPartition extends Resource {
|
||||||
if(xmlEntry.getContent().isLogicalPartition()) {
|
if(xmlEntry.getContent().isLogicalPartition()) {
|
||||||
entry = xmlEntry.getContent().getLogicalPartitionEntry();
|
entry = xmlEntry.getContent().getLogicalPartitionEntry();
|
||||||
this.name = entry.getName();
|
this.name = entry.getName();
|
||||||
log.info("discover() - {}", entry.getName());
|
log.info("discover() - [{}] {} ({})", String.format("%2d", entry.partitionId), entry.getName(), entry.operatingSystemType);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("Failed to deserialize LogicalPartition");
|
throw new UnsupportedOperationException("Failed to deserialize LogicalPartition");
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,7 @@ class ManagedSystem extends Resource {
|
||||||
if(xmlEntry.getContent().isManagedSystem()) {
|
if(xmlEntry.getContent().isManagedSystem()) {
|
||||||
entry = xmlEntry.getContent().getManagedSystemEntry();
|
entry = xmlEntry.getContent().getManagedSystemEntry();
|
||||||
this.name = entry.getName();
|
this.name = entry.getName();
|
||||||
|
log.info("discover() - [{}] {} ({})", entry.machineTypeModelAndSerialNumber.getTypeAndModelAndSerialNumber(), entry.getName(), entry.systemFirmware);
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("Failed to deserialize ManagedSystem");
|
throw new UnsupportedOperationException("Failed to deserialize ManagedSystem");
|
||||||
}
|
}
|
||||||
|
@ -127,7 +128,7 @@ class ManagedSystem extends Resource {
|
||||||
for (Link link : this.entry.getAssociatedLogicalPartitions()) {
|
for (Link link : this.entry.getAssociatedLogicalPartitions()) {
|
||||||
LogicalPartition logicalPartition = new LogicalPartition(restClient, link.getHref(), this);
|
LogicalPartition logicalPartition = new LogicalPartition(restClient, link.getHref(), this);
|
||||||
logicalPartition.discover();
|
logicalPartition.discover();
|
||||||
|
if(Objects.equals(logicalPartition.entry.partitionState, "running")) {
|
||||||
// Check exclude / include
|
// Check exclude / include
|
||||||
if(!excludePartitions.contains(logicalPartition.name) && includePartitions.isEmpty()) {
|
if(!excludePartitions.contains(logicalPartition.name) && includePartitions.isEmpty()) {
|
||||||
logicalPartitions.add(logicalPartition);
|
logicalPartitions.add(logicalPartition);
|
||||||
|
@ -137,6 +138,7 @@ class ManagedSystem extends Resource {
|
||||||
//log.info("discover() - adding included partition: {}", logicalPartition.name);
|
//log.info("discover() - adding included partition: {}", logicalPartition.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtualIOServers.clear();
|
virtualIOServers.clear();
|
||||||
for (Link link : this.entry.getAssociatedVirtualIOServers()) {
|
for (Link link : this.entry.getAssociatedVirtualIOServers()) {
|
||||||
|
|
|
@ -153,7 +153,7 @@ class ManagementConsole implements Runnable {
|
||||||
|
|
||||||
if(xmlFeed.getEntry().getContent().isManagementConsole()) {
|
if(xmlFeed.getEntry().getContent().isManagementConsole()) {
|
||||||
entry = xmlFeed.getEntry().getContent().getManagementConsole();
|
entry = xmlFeed.getEntry().getContent().getManagementConsole();
|
||||||
log.info("discover() - {}", entry.getName());
|
//log.info("discover() - {}", entry.getName());
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("Failed to deserialize ManagementConsole");
|
throw new UnsupportedOperationException("Failed to deserialize ManagementConsole");
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,9 @@ public class LogicalPartitionEntry implements Serializable, ResourceEntry {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@JsonProperty("PartitionID")
|
||||||
|
public Number partitionId;
|
||||||
|
|
||||||
@JsonProperty("PartitionName")
|
@JsonProperty("PartitionName")
|
||||||
public String partitionName;
|
public String partitionName;
|
||||||
|
|
||||||
|
|
|
@ -35,4 +35,12 @@ public class MachineTypeModelAndSerialNumber implements Serializable {
|
||||||
return serialNumber;
|
return serialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTypeAndModel() {
|
||||||
|
return machineType+"-"+model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeAndModelAndSerialNumber() {
|
||||||
|
return machineType+"-"+model+"-"+serialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue