-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.ps1
58 lines (33 loc) · 1.59 KB
/
test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Import-Module ".\Elastico\Elastico.psd1"
$nodes = @(
"http://localhost:9200"
)
Get-ElasticV2ClusterHealth
Get-ElasticV5ClusterHealth
Get-ElasticV6ClusterHealth
Get-ElasticV7ClusterHealth
# Get-Command -Module Elastico | Format-Table -Property Name,Version
# Get-Help Get-ElasticV2ClusterHealth
# Get-ElasticV2ClusterHealt -Index ".kibana" -Verbose
# \\\\WIN2012\\Backup\\
# New-ElasticV2RepositoryFileSystem -Name "test1" -Location "test1" -Compress $true -Verbose
# Get-ElasticV2RepositorySettings
# New-ElasticV2Snapshot -Repository "test1" -Name "snap1"
# Get-ElasticV2Snapshot -Repository "test1"
# Get-ElasticV2NodeInfo -Verbose
# Get-ElasticV2ClusterHealt | Get-ElasticV2Node
#Get-ElasticV2ClusterHealtHealth "localhost:9200" -Verbose
#Get-ElasticV2IndicesHealth
# Get-ElasticV2Index
#Get-ElasticV2Index -Index ".kibana,logstash-2016.06.18"
#Get-ElasticV2Index -Index @(".kibana", "logstash-2016.06.18")
# Get-ElasticV2Index -Index "logstash-*" | Remove-ElasticV2Index
# Remove-ElasticV2Index -Index "logstash-*"
# New-ElasticV2Index -Index "test1234"
#Search-ElasticV2 -Index "logstash-*" | Where-Object { $_.EventID -eq 4002 }
# Search-ElasticV2 -Index "logstash-*" -Query "EventID: 7036" -Size 2 -Verbose
# Search-ElasticV2 -Node $nodes -Query "EventID: 7036" -Fields @("Hostname", "EventID", "Version") -Verbose
#Search-ElasticV2 -Node $nodes -Query "EventID: 7036" -Fields "Hostname,EventID" -Verbose
# Get-ElasticV2IndexSettings -Index ".kibana"
# Set-ElasticV2IndexSettings -Index ".kibana" -Settings @{ "number_of_shards" = 2 } -Verbose
# Get-ElasticV2IndexSettings -Index ".kibana"