- Properties are pieces of data that are not expected to frequently change
- Identity Properties are Properties that serve as unique identifiers for an instance of the data you’re sending
- Observations are pieces of data that are expected to frequently change, and they can be either StringObservations or Metrics
- In Foglight 5, Metrics can have units. If you don’t specify one, the default unit for a Metric is ‘count’
Given these, here’s our simple recipe for porting a Foglight 4 script agent:
- Required: For entries that return a string, such as myStringValue = somestring, decide if myStringValue should be a Property, an Identity Property, or a String Observation. So change this to:
myStringValue.String.Id = somestring if myStringValue is going to be an Identity Property myStringValue.String = somestring if myStringValue is going to be a non-identity Property myStringValue.StringObservation.Obs = somestring if myStringValue is going to be a StringObservation
- Recommended: For entries that return numerical values, such as CpuUtilization = 50, add a unit name to the metric, so you could have:
CpuUtilization:percent = 50
Geoff lists all the possible unit names in his second blog article cited above so I won’t repeat them here.
That should do it - your script agent should now be ready to rock in Foglight 5.