Skip to content

Commit

Permalink
Fixes for hp-ux
Browse files Browse the repository at this point in the history
  • Loading branch information
sschwartzman committed Jul 30, 2020
1 parent 7808638 commit 30b0c81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"os_settings": {
"disksCommand": "",
"disksRegex": "",
"disksCommand": "df -l",
"disksRegex": "\\/\\S*\\s+\\(([^\\)]+)\\).*",
"interfacesCommand": "/etc/lanscan",
"interfacesRegex": "\\S+\\s+0x[0-9A-Fa-f]+\\s+\\d+\\s+\\S+\\s+\\w+(\\d+).*",
"pageSizeCommand": "/bin/getconf PAGESIZE"
},
"commands": [{
"eventType": "Disk",
"command": "/bin/bdf -l -i",
"command": "/bin/bdf -i MEMBER_PLACEHOLDER",
"mappings": [{
"expression": "(\\S+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(.*)",
"expression": "[^\\d]*(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(.*)",
"metrics": [{
"name": "DISK_NAME"
},
{
"name": "Total",
"type": "NORMAL"
},
Expand Down Expand Up @@ -181,9 +178,9 @@
},
{
"eventType": "Stats",
"command": "swapinfo",
"command": "/usr/sbin/swapinfo",
"mappings": [{
"expression": ".*(\\w+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%.*",
"expression": "(\\w+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%.*",
"metrics": [{
"name": "METRIC_INSTANCE"
},
Expand All @@ -210,7 +207,7 @@
"eventType": "Stats",
"command": "top -d1 -h -n1",
"mappings": [{
"expression": ".*Load averages:\\s+([0-9\\.]+),\\s+([0-9\\.]+),\\s+([0-9\\.]+)",
"expression": "Load averages:\\s+([0-9\\.]+),\\s+([0-9\\.]+),\\s+([0-9\\.]+).*",
"metrics": [{
"name": "LoadAverage.1 Minute",
"type": "NORMAL"
Expand All @@ -226,7 +223,7 @@
]
},
{
"expression": ".*(\\d+)\\s+processes:\\s+(\\d+)\\s+sleeping,\\s+(\\d+),\\s+running",
"expression": "(\\d+)\\s+processes:\\s+(\\d+)\\s+sleeping,\\s+(\\d+)\\s+running.*",
"metrics": [{
"name": "Processes.Total",
"type": "NORMAL"
Expand All @@ -242,7 +239,7 @@
]
},
{
"expression": ".*(\\d+\\.\\d+)\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%\\s+(\\d+\\.\\d+)%",
"expression": "\\s*([\\d\\.]+)\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%\\s+([\\d\\.]+)%.*",
"metrics": [{
"name": "CPU.Load",
"type": "NORMAL"
Expand Down
4 changes: 2 additions & 2 deletions pluginctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ install_dashboards() {
installer_url=$(get_variable ${pluginJsonLocation} installer_url ${defaultInstallerURL})
force_deploy=$(get_variable ${pluginJsonLocation} force_deploy ${defaultForceDeploy})

if [ "$1" == "force_deploy" ]; then
if [ "$1" = "force_deploy" ]; then
force_deploy=true
fi

Expand All @@ -251,7 +251,7 @@ install_dashboards() {
echo "Dashboards: Skipping installation."
else
echo "Dashboards: Installing dashboards for $PLUGIN_NAME."
if [ ${force_deploy} == "true" ]; then
if [ ${force_deploy} = "true" ]; then
echo "Dashboards: Force-deploy is enabled."
fi
if command -v curl 2>&1 >/dev/null; then
Expand Down

0 comments on commit 30b0c81

Please sign in to comment.