{"id":18806756,"url":"https://github.com/lefred/facter-mysql","last_synced_at":"2025-04-13T19:12:51.677Z","repository":{"id":140210078,"uuid":"1557658","full_name":"lefred/facter-mysql","owner":"lefred","description":"mysql facter","archived":false,"fork":false,"pushed_at":"2011-10-19T07:41:11.000Z","size":105,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T09:52:01.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefred.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-01T22:15:09.000Z","updated_at":"2021-08-17T12:16:10.000Z","dependencies_parsed_at":"2023-03-11T20:06:13.254Z","dependency_job_id":null,"html_url":"https://github.com/lefred/facter-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Ffacter-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Ffacter-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Ffacter-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Ffacter-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefred","download_url":"https://codeload.github.com/lefred/facter-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766745,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T22:49:27.665Z","updated_at":"2025-04-13T19:12:51.653Z","avatar_url":"https://github.com/lefred.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql.rb\n# Facts related to MySQL status\n#\n# Author: Frederic -lefred- Descamps\n# \u003clefred.descamps@gmail.com\u003e\n# http://www.lefred.be/\n# license: GPLv2\n\n# this code is hosted on github : https://github.com/lefred/facter-mysql\n\n# mysql.rb should be installed in your facter directory, for example on a fedora 14 it is\n# in /usr/lib/ruby/site_ruby/1.8/facter\n\nThis facter allows you to retrieve information from MySQL.\n\nFor the moment the version (mysql_version), all the returned values\nof SHOW STATUS are available as a fact (prefixed with mysql_), so \n\"open_files\" becomes \"mysql_open_files\" and\nthe returned values of SHOW SLAVE STATUS prefixec with mysql_replica_ \n\nThe goal of this facter was to be able to use it within mcollective.\n\nINFO: the username and password used to connect to the mysql server\n      should be present in the [client] version of the my.cnf\n      example:\n        [client]\n        username=lefred\n        password=mysqlisgreat\n\nSome examples:\n=============\nwith facter:\n------------\n[root@delvaux facter]# facter mysql_version 2\u003e/dev/null\n5.5.10\n[root@delvaux facter]# facter mysql_max_used_connections 2\u003e/dev/null\n3\n\nwith mcollective:\n-----------------\n[root@delvaux facter]# mc-facts mysql_version\nReport for fact: mysql_version\n\n        5.0.51a-24+lenny5-log                   found 1 times\n        5.5.10                                  found 1 times\n\nFinished processing 2 / 2 hosts in 64.36 ms\n\n\n\n[root@delvaux facter]# mc-facts mysql_open_files\nReport for fact: mysql_open_files\n\n        16                                      found 1 times\n        18                                      found 1 times\n\nFinished processing 2 / 2 hosts in 2418.13 ms\n\n[root@delvaux facter]# mc-facts mysql_open_files -v\nDetermining the amount of hosts matching filter for 2 seconds .... 2\nReport for fact: mysql_open_files\n\n        16                                      found 1 times\n\n            delvaux.maladree.be\n\n        18                                      found 1 times\n\n            debian1.maladree.be\n\n\n---- rpc stats ----\n           Nodes: 2 / 2\n     Pass / Fail: 0 / 0\n      Start Time: Sat Apr 02 00:11:46 +0200 2011\n  Discovery Time: 2001.84ms\n      Agent Time: 1344.24ms\n      Total Time: 3346.08ms\n\n[root@delvaux facter]# mc-facts mysql_threads_connected \nReport for fact: mysql_threads_connected\n\n        2                                       found 2 times\n\nFinished processing 2 / 2 hosts in 3270.86 ms\n\n[root@delvaux facter]# mc-facts mysql_threads_connected -v\nDetermining the amount of hosts matching filter for 2 seconds .... 2\nReport for fact: mysql_threads_connected\n\n        2                                       found 2 times\n\n            debian1.maladree.be\n            delvaux.maladree.be\n\n\n---- rpc stats ----\n           Nodes: 2 / 2\n     Pass / Fail: 0 / 0\n      Start Time: Sat Apr 02 00:12:47 +0200 2011\n  Discovery Time: 2001.73ms\n      Agent Time: 50.43ms\n      Total Time: 2052.15ms\n\n[root@delvaux facter]# mc-facts mysql_replica_slave_sql_running -v\nDetermining the amount of hosts matching filter for 2 seconds .... 3\nReport for fact: mysql_replica_slave_sql_running\n\n         Yes                                    found 2 times\n\n            debian1\n            debian2\n\n\n---- rpc stats ----\n           Nodes: 3 / 3\n     Pass / Fail: 0 / 0\n      Start Time: Sat Apr 02 23:22:31 +0200 2011\n  Discovery Time: 2005.77ms\n      Agent Time: 51.02ms\n      Total Time: 2056.79ms\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Ffacter-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefred%2Ffacter-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Ffacter-mysql/lists"}