{"id":18596631,"url":"https://github.com/sergiotocalini/jenkix","last_synced_at":"2025-04-10T17:30:20.990Z","repository":{"id":83054474,"uuid":"125068340","full_name":"sergiotocalini/jenkix","owner":"sergiotocalini","description":"Zabbix Agent - Jenkins","archived":false,"fork":false,"pushed_at":"2020-10-20T14:41:31.000Z","size":79,"stargazers_count":13,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T01:20:21.896Z","etag":null,"topics":["jenkins","monitoring","monitoring-plugins","monitoring-scripts","script","shell","shell-scripts","zabbix","zabbix-agent","zabbix-templates"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergiotocalini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-13T14:54:49.000Z","updated_at":"2023-04-11T11:53:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e57fa9c-feb4-4f15-bebf-8a1bc4810466","html_url":"https://github.com/sergiotocalini/jenkix","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/sergiotocalini%2Fjenkix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fjenkix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fjenkix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiotocalini%2Fjenkix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergiotocalini","download_url":"https://codeload.github.com/sergiotocalini/jenkix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261993,"owners_count":21074229,"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":["jenkins","monitoring","monitoring-plugins","monitoring-scripts","script","shell","shell-scripts","zabbix","zabbix-agent","zabbix-templates"],"created_at":"2024-11-07T01:25:09.715Z","updated_at":"2025-04-10T17:30:20.985Z","avatar_url":"https://github.com/sergiotocalini.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jenkix\nJenkins Monitoring\n\nThis script is part of a monitoring solution that allows to monitor several\nservices and applications.\n\nFor more information about this monitoring solution please check out this post\non my [site](https://sergiotocalini.github.io/project/monitoring).\n\n# Dependencies\n## Packages\n* curl\n* jq\n* ksh\n* sudo\n\n### Debian/Ubuntu\n```\n~# sudo apt install curl jq ksh sudo\n~#\n```\n### Red Hat\n```\n~# sudo yum install curl jq ksh sudo\n~#\n```\n# Deploy\n## Sudoers\nThe deploy script is not intended to advise which approach you should implemented nor\ndeploy the sudoers configuration but the user that will run the script needs to have\nsudo privileges for some checks.\n\nThere are two options to setting up sudoers for the user:\n1. Provided sudo all\n```bash\n~# cat /etc/sudoers.d/user_zabbix\nDefaults:zabbix !syslog\nDefaults:zabbix !requiretty\n\nzabbix\tALL=(ALL)  NOPASSWD:ALL\n~#\n```\n2. Limited acccess to run command with sudo\n```bash\n~# cat /etc/sudoers.d/user_zabbix\nDefaults:zabbix !syslog\nDefaults:zabbix !requiretty\n\nzabbix ALL=(ALL) NOPASSWD: /usr/bin/lsof *\nzabbix ALL=(ALL) NOPASSWD: /bin/ps *\n~#\n```\n## Parameters\nThe username and the password can be empty if jenkins has the read only option enable.\nDefault variables:\n\nNAME|VALUE\n----|-----\nJENKINS_URL|http://localhost:8080\nJENKINS_USER|\u003cempty\u003e\nJENKINS_PASS|\u003cempty\u003e\nCACHE_DIR|/etc/zabbix/scripts/agentd/jenkix/tmp\nCACHE_TTL|5\nSCRIPT_DIR|/etc/zabbix/scripts/agentd/jenkix\nZABBIX_INC|/etc/zabbix/zabbix_agentd.d\n\n*__Note:__ this variables has to be saved in the config file (jenkix.conf) in the same directory than the script.*\n\n## Demo Deploy\n```\n~# git clone https://github.com/sergiotocalini/jenkix.git\n~# ./jenkix/deploy_zabbix.sh -H\nUsage:  [Options]\n\nOptions:\n  -F            Force configuration overwrite.\n  -H            Displays this help message.\n  -P            Installation prefix (SCRIPT_DIR).\n  -Z            Zabbix agent include files directory (ZABBIX_INC).\n  -c            Configuration key CACHE_DIR.\n  -j            Configuration key JENKINS_URL.\n  -p            Configuration key JENKINS_PASS.\n  -t            Configuration key CACHE_TTL.\n  -u            Configuration key JENKINS_USER.\n\nPlease send any bug reports to sergiotocalini@gmail.com\n~# sudo ./jenkix/deploy_zabbix.sh -j \"${JENKINS_URL}\" \\\n   \t\t\t\t  -u \"${JENKINS_USER}\" \\\n\t\t\t\t  -p \"${JENKINS_PASS}\"\n~# sudo systemctl restart zabbix-agent\n```\n\n*__Note:__ the installation has to be executed on the zabbix agent host and you have to import the template on the zabbix web. The default installation directory is /etc/zabbix/scripts/agentd/jenkix*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiotocalini%2Fjenkix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiotocalini%2Fjenkix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiotocalini%2Fjenkix/lists"}