added kiosk label to each logs set

This commit is contained in:
Mathew 2024-09-27 13:29:55 +00:00
parent 8fec63777a
commit 5dcf578f63

View File

@ -11,6 +11,7 @@ param(
## https://devblogs.microsoft.com/powershell/v2-custom-enums/ better, but limited to alphanumeric, so *DHCP would not work ## https://devblogs.microsoft.com/powershell/v2-custom-enums/ better, but limited to alphanumeric, so *DHCP would not work
[Parameter(Mandatory=$true, HelpMessage="Hotel site e.g. gb-bw-peartree-manchester, bikes, gb-ihg-holidayinn-birmingham")][String]$HotelGroup, [Parameter(Mandatory=$true, HelpMessage="Hotel site e.g. gb-bw-peartree-manchester, bikes, gb-ihg-holidayinn-birmingham")][String]$HotelGroup,
[Parameter(Mandatory=$true, HelpMessage="Hotel site e.g. operaapp, checkin, ")][ValidateSet('operaapp','checkin','hopapp')][String]$apptype, [Parameter(Mandatory=$true, HelpMessage="Hotel site e.g. operaapp, checkin, ")][ValidateSet('operaapp','checkin','hopapp')][String]$apptype,
[Parameter(Mandatory=$true, HelpMessage="Kiosk Number e.g. 1, 2, 3, 4 (use the numeric) ")][String]$kiosknumber,
[Parameter(Mandatory=$true, HelpMessage="Have you updated the following Group Policy? Computerconfig > windows settings > security settings > advanced audit policy config > object access > double click audit removable storage.(yes/no)")][ValidateSet('yes')][String]$gpochange [Parameter(Mandatory=$true, HelpMessage="Have you updated the following Group Policy? Computerconfig > windows settings > security settings > advanced audit policy config > object access > double click audit removable storage.(yes/no)")][ValidateSet('yes')][String]$gpochange
) )
@ -248,6 +249,7 @@ scrape_configs:
labels: labels:
hotel: testhotel hotel: testhotel
job: testapptype job: testapptype
kiosk: testkiosknumber
__path__: 'C:\Program Files\Self-Service Technology\Logs\testhotel.log' __path__: 'C:\Program Files\Self-Service Technology\Logs\testhotel.log'
- job_name: sst - job_name: sst
static_configs: static_configs:
@ -256,12 +258,16 @@ scrape_configs:
labels: labels:
hotel: testhotel hotel: testhotel
job: sst job: sst
kiosk: testkiosknumber
__path__: 'C:\Program Files\Self-Service Technology\Logs\SST.Browser.log' __path__: 'C:\Program Files\Self-Service Technology\Logs\SST.Browser.log'
- job_name: windows-system - job_name: windows-system
windows_events: windows_events:
eventlog_name: 'Microsoft-Windows-DriverFrameworks-UserMode/Operational' eventlog_name: 'Microsoft-Windows-DriverFrameworks-UserMode/Operational'
labels: labels:
logsource: windows-eventlog logsource: windows-eventlog
hotel: gb-i-peartree-salisbury
job: winlogs
kiosk: testkiosknumber
use_incoming_timestamp: true use_incoming_timestamp: true
bookmark_path: 'C:\ProgramData\Promtail\bookmark-system.xml' bookmark_path: 'C:\ProgramData\Promtail\bookmark-system.xml'
exclude_event_data: true exclude_event_data: true
@ -270,6 +276,8 @@ scrape_configs:
" "
$content = $content.Replace('testhotel',"$HotelGroup") $content = $content.Replace('testhotel',"$HotelGroup")
$content = $content.Replace('testapptype',"$apptype") $content = $content.Replace('testapptype',"$apptype")
$content = $content.Replace('testkiosknumber',"$kiosknumber")
Set-Content -Path $fullConfigPath -Value $content Set-Content -Path $fullConfigPath -Value $content
} }