Skip to content

PowerShell module for common maintenance tasks in ElasticSearch.

License

Notifications You must be signed in to change notification settings

staufour/elasticsearch-maintenance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elasticsearch-maintenance

PowerShell module for common maintenance tasks in ElasticSearch.

###Supported APIs

###Requirements

###Getting Started PowerShell modules can be loaded by either copying the PSM1 and PSD1 files into your $env:PSModulePath or by directly referencing the PSD1 module manifest when calling Import-Module. Once imported the command Get-EsIndexes becomes available for use in the shell instance. The command returns a PowerShell object containing NoteProperties of returned indicies and ScriptMethods that can be called against them.

###Command Syntax The command makes HTTP calls to the ElasticSearch server at the Server and Port you specify. By default ALL indexes present will be returned. The prefix will vary based on your use and needs, but in our case ElasticSearch is used to catalog LogStash data - so indexes look like "logstash-${YEAR}-${MONTH}-${DAY}.${HOUR}" (i.e. the IndexPrefix is "logstash").

Get-EsIndexes -Server <ES FQDN or IP Address [Default=localhost]> -Port <ES Port [Default=9200]> -IndexPrefix <ES Index Prefix [Default=.*]>

###Object Definitions

Name MemberType Definition
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Age NoteProperty System.TimeSpan
Index NoteProperty System.String
Port NoteProperty System.Int32
Server NoteProperty System.String
Status NoteProperty System.String
ClearCache ScriptMethod System.Object ClearCache()
CloseIndex ScriptMethod System.Object CloseIndex()
Delete ScriptMethod System.Object Delete()
Flush ScriptMethod System.Object Flush()
OpenIndex ScriptMethod System.Object OpenIndex()
Optimize ScriptMethod System.Object Optimize()
Refresh ScriptMethod System.Object Refresh()

About

PowerShell module for common maintenance tasks in ElasticSearch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%