Ad Widget

Collapse

Agent: UserParameter, execution in parallel or queued order?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Flowsen
    Junior Member
    • Jul 2014
    • 2

    #1

    Agent: UserParameter, execution in parallel or queued order?

    Dear Community,

    since it is not possible to pass multiple values to the Zabbix Server using UserParameter I am struggling with getting the best performance.

    Can someone tell me if the UserParameter calls are done in queue or if multiple UserParameter are processed in parallel?

    For example in zabbix_agentd.conf I have:
    Code:
    UserParameter=harddisk.discovery,/home/zabbix_harddisk.sh
    UserParameter=harddisk.data[*],/home/zabbix_harddisk.sh $1 $2
    Currently I receive a list of all physical harddisks with the first line - thats just fine.

    On the second line I get different SMART values and information of the drive.

    $1 is the harddrive $2 the value, for example:

    /home/zabbix_harddisk.sh /dev/sda smart_value_5
    /home/zabbix_harddisk.sh /dev/sda smart_value_194
    /home/zabbix_harddisk.sh /dev/sda smart_value_196

    and so on...

    It works well, but smartctl and other operations are executed multiple times which would not be necessary if zabbix server accepts more than one return value.

    My aproach is to cache all informations as soon as any of the above smart_values is requested. This would work perfectly if zabbix agentd does not run multiple UserParameter simultaneously.

    Does anyone know if zabbix proccesses these external command in a queue or parallel?

    Thanks!
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    I don't know answer for your question, but I idea for you:
    Use zabbix_sender and then you can send many values in one go. And you can still call script (with zabbix_sender) as userparameter script.

    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • Flowsen
      Junior Member
      • Jul 2014
      • 2

      #3
      Thats a good idea, thank you.
      I didn't know that it is possible to send multiple items with zabbix-sender.

      So basically I should keep:
      Code:
      UserParameter=harddisk.discovery,/home/zabbix_harddisk.sh
      to get my list of harddisks and afterwards use
      Code:
      UserParameter=harddisk.data[*],/home/zabbix_harddisk.sh $1
      and pass with $1 the harddisk i received with harddisk.recovery
      All values I need are now sent with zabbix-sender!

      This solved my problem - you really made my day!

      Comment

      Working...