Ad Widget

Collapse

Adding a string to HostnameItem IN WINDOWS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • high-t
    Member
    • Dec 2014
    • 68

    #1

    Adding a string to HostnameItem IN WINDOWS

    Hi.

    In zabbix_agentd.conf on a LINUX maching, I can easily use
    Code:
    HostnameItem=system.run[echo "Web Server `hostname -f`"]
    , and get the expected result.
    Is there an equivalent to the above when running Zabbix Agent for Windows Server?

    Thank you!
    Amit.
  • high-t
    Member
    • Dec 2014
    • 68

    #2
    So I got that resolved on my own.
    If anyone is interested: here is the equivalent HostnameItem for Windows based servers (I use AWS EC2 instance, so the hostname part is actually resolved by querying the "magic ip" for the instance's metadata):
    Code:
    HostnameItem=system.run[echo|set /p="Web Server " & curl -s http://169.254.169.254/latest/meta-data/local-hostname]

    Comment

    Working...