Ad Widget

Collapse

A question about script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • unknown_man
    Junior Member
    • Jan 2010
    • 10

    #1

    A question about script

    Hi, I'm a newbie to zabbix. I've got a Ubuntu server that installs zabbix and some windows clients running zabbix agent. Everything is running well. My question is how can I write scripts and how to run them on agent to send infomation back to the server? and can I make a call from server to the agents to get them run some given script (something like RPCs)? thank you very much
  • MartinJanda
    Junior Member
    • Oct 2009
    • 27

    #2
    Try zabbix agent item type:

    system.run[command,<mode>]

    Example:
    system.run[ls -l /] - detailed file list of root directory.

    To enable this functionality, agent configuration file must have EnableRemoteCommands=1 option.

    I never tried it.

    Comment

    • unknown_man
      Junior Member
      • Jan 2010
      • 10

      #3
      so many thanks for your advice. But I still need more detail of a guide. Could you help me one more time, pls? And I need to know for sure if i can get ANY infomation from agent.

      Comment

      • MartinJanda
        Junior Member
        • Oct 2009
        • 27

        #4
        you can try to use zabbix_get for getting data from a remote/local Zabbix Agent. Just set up correctly and run zabbix_agentd. If you've got everything set right, you see the result. First time you try a simple item such as hostname or something like that.

        Man page:
        http://www.zabbix.com/documentation/...ges/zabbix_get

        Comment

        • unknown_man
          Junior Member
          • Jan 2010
          • 10

          #5
          Originally posted by MartinJanda
          Try zabbix agent item type:

          system.run[command,<mode>]

          Example:
          system.run[ls -l /] - detailed file list of root directory.

          To enable this functionality, agent configuration file must have EnableRemoteCommands=1 option.

          I never tried it.
          I did create an item like this. But how can I make it run? could you tell me?

          Comment

          Working...