Code Monkey home page Code Monkey logo

Comments (3)

gerardstanczak avatar gerardstanczak commented on June 16, 2024 1

Hi PingLord,

Thanks for pointing out this issue. I updated the userparameters to the newest version. It seems some of our recent changes were only partially submitted to github, resulting in this inconsistency. If you have time please check the new template and userparameters to see if they are working fine. Thanks!

from zabbix.

kporembinski avatar kporembinski commented on June 16, 2024

Can you run for example:

# php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items ok
ok:71579

Do you have any results?

from zabbix.

PingLord avatar PingLord commented on June 16, 2024

Tried that and also found the issue.
There was no result and no output from the script and did not understand why until i went a little deeper into the details.
The issue was with the defined array from php which had different keys from the userparameter provided :

from php file :

$keys = array(
      'Key_read_requests'           =>  'gg',
      'Key_reads'                   =>  'gh',
      'Key_write_requests'          =>  'gi',
      'Key_writes'                  =>  'gj',
      'history_list'                =>  'gk',
      'innodb_transactions'         =>  'gl',
      'read_views'                  =>  'gm',
      'current_transactions'        =>  'gn',
      'locked_transactions'         =>  'go',
      'active_transactions'         =>  'gp',
      'pool_size'                   =>  'gq',
      'free_pages'                  =>  'gr',
      'database_pages'              =>  'gs',
      'modified_pages'              =>  'gt',
      'pages_read'                  =>  'gu',
      'pages_created'               =>  'gv',
      'pages_written'               =>  'gw',

from the userparameter file :

UserParameter=mysql.Key_read_requests,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a0 | awk -F: '{ print $2 }'
UserParameter=mysql.Key_reads,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a1 | awk -F: '{ print $2 }'
UserParameter=mysql.Key_write_requests,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a2 | awk -F: '{ print $2 }'
UserParameter=mysql.Key_writes,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a3 | awk -F: '{ print $2 }'
UserParameter=mysql.history_list,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a4 | awk -F: '{ print $2 }'
UserParameter=mysql.innodb_transactions,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a5 | awk -F: '{ print $2 }'
UserParameter=mysql.read_views,php -qc /etc/zabbix/php.ini /etc/zabbix/bin/ss_get_mysql_stats.php --host localhost --items a6 | awk -F: '{ print $2 }'

As you can see, the calls made for the item key in the userparameter is different from the item keys in the php file.

This was it. Hope it helps others also

from zabbix.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.