forked from Twikki/Zabbix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_config_versions.ps1
52 lines (35 loc) · 1.33 KB
/
show_config_versions.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
# Version: 1.0
# This file is maintained in Github
#
# THIS SCRIPT IS READY TO USE
#
# Configs
# Checks if zabbix_agentd.userparams.conf file exists. If yes, get's the version
$ChkFile = "C:\Zabbix\conf\zabbix_agentd.userparams.conf"
$FileExists = Test-Path $ChkFile
If ($FileExists -eq $True) {
Write-Host "zabbix_agentd.userparams.conf"
get-content c:\zabbix\conf\zabbix_agentd.userparams.conf | select -first 1
}
# Checks if zabbix_agentd.metadata.conf file exists. If yes, get's the version
$ChkFile = "C:\Zabbix\conf\zabbix_agentd.metadata.conf"
$FileExists = Test-Path $ChkFile
If ($FileExists -eq $True) {
Write-Host "zabbix_agentd.metadata.conf"
get-content c:\zabbix\conf\zabbix_agentd.metadata.conf | select -first 1
}
# Checks if zabbix_agentd.win.conf file exists. If yes, get's the version
$ChkFile = "C:\Zabbix\zabbix_agentd.win.conf"
$FileExists = Test-Path $ChkFile
If ($FileExists -eq $True) {
Write-Host "zabbix_agentd.win.conf"
get-content c:\zabbix\zabbix_agentd.win.conf | select -first 1
}
# SCRIPTS
# Checks if show_config_versions.ps1 file exists. If yes, get's the version
$ChkFile = "C:\Zabbix\scripts\show_config_versions.ps1"
$FileExists = Test-Path $ChkFile
If ($FileExists -eq $True) {
Write-Host "show_config_versions.ps1"
get-content C:\Zabbix\scripts\show_config_versions.ps1 | select -first 1
}