QueryXML conditionally, based on what's installed on Windows server?
wbollock
Hi all,
How do I divide my NxLog configuration file into conditionals based on queries? I have an nxlog.conf that doesn't apply equally to all hosts, and NxLog fails if it has to query something that doesn't exist on a Windows server.
I'd like to keep 1 nxlog.conf for all servers instead of having to maintain many confs for a variety of servers.
In psuedocode:
```
if [ exists Microsoft-Windows-TerminalServices ]
then
*
```
However I'm having a hard time translating a lot of the "if statements" I see to NxLog query formats.. anyone have any resources or tips to guide me?
Here's what I tried, obviously wrong, \ cannot be in \
```
if ($Channel == 'Microsoft-Windows-TerminalServices-SessionBroker/Operational')
*
```
Also tried:
```
if ($Channel == 'Microsoft-Windows-TerminalServices-SessionBroker/Operational') \
\
\
\
* \
\
\
```
Thanks for your help.