-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from inexio/dev
Dev into main
- Loading branch information
Showing
22 changed files
with
621 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/inexio/thola/core/request" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
addDeviceFlags(checkServerCMD) | ||
checkCMD.AddCommand(checkServerCMD) | ||
} | ||
|
||
var checkServerCMD = &cobra.Command{ | ||
Use: "server", | ||
Short: "Check the server specific metrics of a device", | ||
Long: "Checks the server specific metrics of a device.\n\n" + | ||
"The usage will be printed as performance data.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
r := request.CheckServerRequest{ | ||
CheckDeviceRequest: getCheckDeviceRequest(args[0]), | ||
} | ||
handleRequest(&r) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/inexio/thola/core/request" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
addDeviceFlags(readServerCMD) | ||
readCMD.AddCommand(readServerCMD) | ||
} | ||
|
||
var readServerCMD = &cobra.Command{ | ||
Use: "server", | ||
Short: "Read out server specific information of a device", | ||
Long: "Read out server specific information of a device like disk usage or process count.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
request := request.ReadServerRequest{ | ||
ReadRequest: getReadRequest(args[0]), | ||
} | ||
handleRequest(&request) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "extremeos" | ||
|
||
match: | ||
logical_operator: "OR" | ||
conditions: | ||
- type: SysObjectID | ||
match_mode: startsWith | ||
values: | ||
- .1.3.6.1.4.1.1916.2.291 | ||
|
||
identify: | ||
properties: | ||
vendor: | ||
- detection: constant | ||
value: "Extreme Networks" | ||
os_version: | ||
- detection: SysDescription | ||
operators: | ||
- type: modify | ||
modify_method: regexSubmatch | ||
regex: 'ExtremeXOS \(EXOS-VM\) version ([^\s]+)' | ||
format: "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "pfsense" | ||
|
||
match: | ||
logical_operator: "OR" | ||
conditions: | ||
- type: SysObjectID | ||
match_mode: startsWith | ||
values: | ||
- .1.3.6.1.4.1.12325 | ||
|
||
identify: | ||
properties: | ||
vendor: | ||
- detection: constant | ||
value: "Pfsense" | ||
os_version: | ||
- detection: snmpget | ||
oid: "1.3.6.1.2.1.25.6.3.1.2.1" | ||
operators: | ||
- type: modify | ||
modify_method: regexSubmatch | ||
regex: 'FreeBSD: FreeBSD ([^\s]+)' | ||
format: "$1" | ||
model: | ||
- detection: SysDescription | ||
operators: | ||
- type: modify | ||
modify_method: regexSubmatch | ||
regex: '([^\s]+) pfSense.localdomain ([^\s]+)' | ||
format: "$1 $2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "vyos" | ||
|
||
match: | ||
logical_operator: "OR" | ||
conditions: | ||
- type: SysObjectID | ||
match_mode: startsWith | ||
values: | ||
- .1.3.6.1.4.1.30803 | ||
|
||
identify: | ||
properties: | ||
vendor: | ||
- detection: constant | ||
value: "Vyatta" | ||
os_version: | ||
- detection: SysDescription | ||
operators: | ||
- type: modify | ||
modify_method: regexSubmatch | ||
regex: 'Vyatta VyOS ([^\s]+)' | ||
format: "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.