
Set Syslog settings across UAG deployments
In this second article on working with APIs in Horizon Cloud Services, we will focus on a practical, security-relevant use case: configuring Syslog on Unified Access Gateways (UAGs) deployed through Horizon Cloud.
Whether you are running Horizon Cloud Service on Microsoft Azure or Horizon Cloud Service on vSphere, centralized logging is a fundamental component of any secure and well-governed environment. Proper Syslog configuration ensures that security events, authentication logs, and operational data generated by UAG appliances are forwarded to your SIEM or log management platform for monitoring, auditing, and incident response.
Instead of performing manual configuration tasks, we will explore how to leverage Horizon Cloud APIs to automate and standardise Syslog settings across UAG deployments, improving consistency, scalability, and operational efficiency.
Now when can explain the API we need to use and how to apply the syslog configuration on UAG (In this case, I used an HCS on vSphere, the new solution where we don’t deploy the Connection Server, but we use the HCS control panel to configure Pools, Entitlements and other…)
The first step is always the authentication process; I explained how to create the API token in my previous post (Horizon Cloud Service Next Gen Apis – Chapter 1), and now I won’t explain it again.
Let’s go…..
How to show UAG information
This command displays the UAG’s information
Invoke-RestMethod -Uri https://cloud-sg.horizon.omnissa.com/admin/v2/uag-deployments Method Get -Headers $Header
We have two UAG deployments connected to HCS, and the output displays two deployment ids:
The UAG id for HCS on vSphere is the second id.
Now I need to recover only the UAG IDs and OrgIDs
Invoke-RestMethod -Uri https://cloud-sg.horizon.omnissa.com/admin/v2/uag-deployments -Method Get -Headers $Header | Select-Object -ExpandProperty content | Select-Object id,OrgId
The UAG id that I need to use for identifying the deployment for HCS on vSphere is:
6994998bcb2a7086afaddf1c
I will use this ID to associate the syslog configuration with the UAG server.
How to set the correct parameters for Syslog configuration
We need to create a Body value like this:
$Body = @{
orgId = "8a4931b3-e6ac-44bf-9d25-723f4119e46f"
projectId = "Pollaio-Project"
name = "Pollaio-Configuration2"
syslogEventCategory = "ALL_EVENTS"
syslogServerProtocolSettingsCreateTO = @{
sourceToSyslogServerProtocol = "TCP"
}
syslogFormat = "TEXT"
syslogURI = "192.168.111.223:514"
includeSystemMessages = $true
sources = @(
@{
type = "UAG"
id = "6994998bcb2a7086afaddf1c"
}
)
}
Where:
| Value | Description | Accept value |
| OrgID | It is the OrgId that we recovered with the previous command | String |
| ProjectId | ID of theCSP project that owns this data | String |
| Name | User defined name of the syslog server configuration | String |
| SyslogEventCategory | Events sent from the UAG appliance to the syslog server | [ ALL_EVENTS, AUDIT_EVENTS ] |
| sourceToSyslogServerProtocol | The protocol used to send data from the UAG appliance to the syslog server | [ UDP, TCP, TLS, MQTT ] |
| syslogFormat | [ JSON_TITAN, TEXT ] | |
| syslogURI | Syslog server URI | String |
| includeSystemMessages | If true, system messages are sent to the syslog server | [ $True] |
| sources |
List of sources associated with the syslog server: Type = Source for the syslog server. For es: UAG Id = Id of the source associated with the syslog server (The Id value that we recovered with the previous command
|
How to set the configuration for UAG
$Body = @{
orgId = "8a4931b3-e6ac-44bf-9d25-723f4119e46f"
projectId = "Pollaio-Project"
name = "Pollaio-Configuration2"
syslogEventCategory = "ALL_EVENTS"
syslogServerProtocolSettingsCreateTO = @{
sourceToSyslogServerProtocol = "TCP"
}
syslogFormat = "TEXT"
syslogURI = "192.168.111.223:514"
includeSystemMessages = $true
sources = @(
@{
type = "UAG"
id = "6994998bcb2a7086afaddf1c"
}
)
}
#Convert Body to JSON
$JsonBody = $Body | ConvertTo-Json -Depth 5
#Send POST request to create Syslog Server UAG configuration
Invoke-RestMethod -Uri https://cloud-sg.horizon.omnissa.com/admin/v1/syslog-server -Method Post -Headers $Header -Body $JsonBody
HOW to check SYSLOG Configuration on UAG deployment
Invoke-RestMethod -Uri https://cloud-sg.horizon.omnissa.com/admin/v1/syslog-server -Method Get -Headers $Header
The command output is like this:
Now I can see in my SYSLOG server the UAG Log








































































