https://github.com/ramblingcookiemonster/pssensu
Simple PowerShell module for working with the Sensu Go API
https://github.com/ramblingcookiemonster/pssensu
Last synced: 6 months ago
JSON representation
Simple PowerShell module for working with the Sensu Go API
- Host: GitHub
- URL: https://github.com/ramblingcookiemonster/pssensu
- Owner: RamblingCookieMonster
- License: mit
- Created: 2019-01-06T01:34:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-09T02:14:48.000Z (almost 7 years ago)
- Last Synced: 2025-02-14T04:27:17.509Z (8 months ago)
- Language: PowerShell
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSSensu
This is a simple wrapper for the [Sensu Go API](https://docs.sensu.io/sensu-go/latest/api/overview/)
This is still a POC/WIP. Expect unannounced breaking changes until version 0.1.0. Use at your own risk : )
Issues and pull requests would be welcome!
## Instructions
* Have PSSensu accessible somewhere
```powershell
# One time setup
# Download the repository
# Unblock the zip
# Extract the PSSensu folder to a module path (e.g. $env:USERPROFILE\Documents\WindowsPowerShell\Modules\)
# Or, with PowerShell 5 or later or PowerShellGet:
Install-Module PSSensu# Import the module.
Import-Module PSSensu #Alternatively, Import-Module \\Path\To\PSSensu# Get commands in the module
Get-Command -Module PSSensu# Get help
Get-Help Get-SensuAccessToken -Full
Get-Help Get-SensuEvents -Full# Set up a default baseuri and credential, get a token
Set-PSSensuConfiguration -BaseUri https://sensu1.fqdn:8080 -Credential $Credential
Get-SensuAccessToken# Get all the entities!
Get-SensuEntities# Get all the properties - not all are displayed by default
Get-SensuEntities | Select-Object -Property *# Get events for dc01
Get-SensuEvent -Name dc01
```