Intro
This is a Step by Step guide to the creation of a dashboard that should show the status of all your FGLAMs in one place and display performance.
Steps
1. Under the Configuration Page select Definitions
2. Click the green + at the bottom to create a new module and call it "FGLAM Status". Ensure you select the relevant roles you require. If in doubt select all of them.
3. We now need to create 3 functions and 3 views within this module.
4. Select the newly created module and you should now have the option to add views and functions from the drop-down box in the menu below.
Functions
1. FQDNTokenized
Add a new function with type 'Script' and fill in the fields as follows:
Name: FQDNTokenized
Cache Results: Tick
Parameters: Name: name Data Type: Common:String
Output Data Type: Common:Object
Script Text:
return name.tokenize('.')[0].tokenize('-')[0]
Click Save at the top to save the function.
2. GetFglamClientInstances
Add a new function with type 'Script' and fill in the fields as follows:
Name: GetFglamClientInstances
Cache Results: Tick
Parameters: None
Output Data Type: Monitoring:FglamClientInstance
Output List: Tick
Script Text:
import groovy.time.*
now = new Date()
fglams = # !FglamClientInstance #.getTopologyObjects();
def output = []
for (fglam in fglams){
if (fglam.jvm){
lu = fglam.jvm.lastUpdated
duration = now.time - lu.time
if(fglam.agents.size() > 0 && duration < 259200000){
output.add(fglam)
}
}
}
return output.sort{it.jvm.lastUpdated}
Click Save at the top to save the function.
3. FglamSeverityMap
Add a new function with type 'Script with Map' and fill in the fields as follows:
Name: FglamSeverityMap
Cache Results: Tick
Parameters: Name: fglam Data Type: Monitoring:FglamClientInstance
Script Text:
import groovy.time.*
now = new Date()
lu = server.DataService.retrieveLatestValue(fglam.messageCenter, "numIncomingQueueThreads").getEndTime()
tl = 2400000
tl2 = 4200000
duration = now.time - lu.time
if(duration > tl2){
return "red"
} else if (duration < tl2 && duration > tl){
return "yellow"
} else {
return "green"
}
Map Input Data Type: Common:String
Output Data Type: Common:Severity
Map Entries:
Key | Value |
red | Fatal |
green | Normal |
yellow | Warning |
Note: The Key Value is "Set to String"
Click Save at the top to save the function.
Views