Ad Widget

Collapse

How to get count of active sql thread via API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • malaybiswal
    Junior Member
    • Mar 2017
    • 2

    #1

    How to get count of active sql thread via API

    Hi,
    I'm writing a program, which needs to pull metrics every few minutes from zabbix via API.
    Below are those metrics. I could not find how to get these data via API call in API documentation. Can anybody point me from where i'll get API documentation for these?


    PostgreSQL Instance Responding: this is just up/down status of the instance… UP=1; DOWN=not 1
    PostgreSQL BE Active SQL: count of active SQL threads
    PostgreSQL BE Lock Waits: count of threads waiting on a lock
    PostgreSQL Trx Commits/sec: count of commits per second
    PostgreSQL Streaming Replication Lag Time: number of seconds of replication lag

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

    #2
    Use history_get.

    Example - last value of item with id 1: http://monitoringartist.github.io/za...20%20%20%20%7D
    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

    • malaybiswal
      Junior Member
      • Mar 2017
      • 2

      #3
      Hi Jan,
      I did try history.get , but result set for metrics which i'm looking for is NULL.
      I could able to get API calls for some item but none from below list.
      Any of these “data discovery” item is not providing any data via API.

      Comment

      Working...