Ad Widget

Collapse

in need of help for my first Zabbix trigger :(

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chavv
    Junior Member
    • Oct 2022
    • 2

    #1

    in need of help for my first Zabbix trigger :(

    Hi, I am trying to make a trigger for IIS port.
    I want it to be checked from the agent running on the same machine.
    IIS is listening on ports (say), 7028 (http) and 8443 (https)
    After applying App IIS template I get a trigger checking for port 80(disabled on machine) - but no matter what I try i can't make it check for other port(s)

    original trigger is called: Template App IIS by Zabbix agent: IIS: Port {$IIS.PORT} is down
    expression is: "net.tcp.service[{$IIS.SERVICE},,{$IIS.PORT}]"


    ​I tried changing the defined value of $iis.port (by changing value of the macro), - no success
    tried writing 7028 instead of $iis.port eg
    "net.tcp.service[{$IIS.SERVICE},,7028]"
    result:

    Cannot add trigger
    • Incorrect item key "net.tcp.service[{$IIS.SERVICE},,7028]" provided for trigger expression on "MyHost".

    ​I simply want to check 2 other ports instead of 80. Surely its very simple
    Thanks​
  • Bartosz Mickiewicz
    Junior Member
    • Oct 2022
    • 27

    #2
    Hi,
    I've managed to simply change the value of IIS.PORT as on the screenshot and it works. Please go to Configuration -> Hosts.
    Click image for larger version

Name:	image.png
Views:	906
Size:	48.4 KB
ID:	452602
    If you would like to monitor two services, I suggest adding a second set of macros, let's say named {$IIS.SERVICE2} and {$IIS.PORT2}, one item and one trigger.
    Click image for larger version

Name:	image.png
Views:	880
Size:	91.2 KB
ID:	452603
    Clone item "IIS by Zabbix agent: IIS: {$IIS.PORT} port ping" and change the key to the proper macros.
    Click image for larger version

Name:	image.png
Views:	999
Size:	10.3 KB
ID:	452604
    Then clone trigger "IIS by Zabbix agent: IIS: Port {$IIS.PORT} is down" and change the expression.
    ​​​Click image for larger version

Name:	image.png
Views:	868
Size:	27.3 KB
ID:	452605
    Works in Zabbix 6.0.
    This is how generated alarms will look like.
    Click image for larger version

Name:	image.png
Views:	862
Size:	7.6 KB
ID:	452606​​

    Comment

    • chavv
      Junior Member
      • Oct 2022
      • 2

      #3
      Thank you very much for detailed explanation! I was completlely missing the part where first must make "item", then clone trigger!
      I was able to make checks using but all my attempts to use the tcp.service end giving "down" state, eg:
      "net.tcp.service[{$IIS.SERVICE},,$IIS.PORT]"​ , even when trying to use [http,,80] or any combination of $IIS.SERVICE , $IIS.PORT and number. But it could be that something was messed up, before asking here

      as this is still a "test" setup /test zabbix server and test machines/ , I will start from scratch and think should be ok now - after getting some basics... and probably going to read bit more of documentation before jumping into the fire

      Thanks a lot

      Comment

      Working...