Ad Widget

Collapse

Can a remote command with no output ever become supported?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • troffasky
    Senior Member
    • Jul 2008
    • 567

    #1

    Can a remote command with no output ever become supported?

    I have a remote command that does not produce any output. If I apply the template to a host before I set "EnableRemoteCommands=1", the item moves in to an unsupported state ["Not supported by Zabbix Agent"].
    If I then enable remote commands and restart the agent, the item appears to be stuck in an Unsupported state, even though the item is basically working fine.
    The remote command is just touching a file, so when it's working, I don't expect any output.
    I appreciate that the design intent for remote commands is to retrieve a value and I am not retrieving anything :-)
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2

    I cannot find any note about command needing to have a visible output... it compares exit code to 0.
    Maybe you stumble on this
    Exit code are checked with the following conditions:
    • Only for custom alert scripts, remote commands and user scripts executed on Zabbix server and Zabbix proxy.
    Exit code seems to be not checked, if executed on agent...

    Comment

    • vicbc
      Member
      • Nov 2021
      • 39

      #3
      Hey troffasky, what's up?

      Indeed, it's not supposed to behave like that.
      But there might be some things to analyse.

      Can you send a print of your Item Configuration?
      I believe it's a SSH Agent executing touch command, right?

      If that's the case, I have reasons to believe that it is becoming "Not Supported" because there's no value to retrieve.
      In that case I suppose the item would become unsupported, since the main purpose of an Item is to retrieve information.

      You could also take a look at the logs file.
      If there's not enough information for why the item became unsupported, try to increase log debug level (get ready for a tsunami of entries, so just redo the steps and lower debug level so your disk doesn't get it too rough).

      Send us any news you get, alright?

      Cheers.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Originally posted by vicbc
        Can you send a print of your Item Configuration?
        I believe it's a SSH Agent executing touch command, right?
        Topic starter says "remote command".. that is not same as "ssh agent" type of item....

        Comment


        • vicbc
          vicbc commented
          Editing a comment
          Right I kind of missed that.
          But anyways, we still need more information to help.
      • troffasky
        Senior Member
        • Jul 2008
        • 567

        #5
        Originally posted by vicbc
        Can you send a print of your Item Configuration?
        system.run[touch /tmp/zabbix.canary]


        Originally posted by vicbc
        If that's the case, I have reasons to believe that it is becoming "Not Supported" because there's no value to retrieve.
        It becomes Not Supported when the target agent does not have Remote Commands enabled. If I enable Remote Commands on the agent before applying the template, all is well.


        The item being stuck in the Not Supported state means that the effective update interval is 10 minutes rather than the 1 minute I was aiming for. I have a trigger of 15 minutes on the age of the canary file, so the practical consequences of this are minimal.

        Comment

        Working...