{"id":18497662,"url":"https://github.com/centreon/centreon-injector","last_synced_at":"2025-04-09T00:30:39.338Z","repository":{"id":43836890,"uuid":"323930199","full_name":"centreon/centreon-injector","owner":"centreon","description":"Inject centreon objects directly in database","archived":false,"fork":false,"pushed_at":"2025-04-01T15:39:00.000Z","size":122,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-01T16:36:43.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centreon.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-23T14:57:33.000Z","updated_at":"2025-04-01T15:39:02.000Z","dependencies_parsed_at":"2022-09-12T19:23:44.182Z","dependency_job_id":"b3588db1-9979-4da0-9c7f-215bcbb5befb","html_url":"https://github.com/centreon/centreon-injector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centreon%2Fcentreon-injector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centreon%2Fcentreon-injector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centreon%2Fcentreon-injector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centreon%2Fcentreon-injector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centreon","download_url":"https://codeload.github.com/centreon/centreon-injector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949665,"owners_count":21023364,"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-06T13:35:15.991Z","updated_at":"2025-04-09T00:30:39.329Z","avatar_url":"https://github.com/centreon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# centreon-injector\n\nInject centreon objects directly in database\n\n## Prerequisites\n\n* git\n* php \u003e=8.0\n* php-yaml module\n* composer\n* docker (optional)\n\n\u003e :warning: **If you are not using docker**, you need to clone\ncentreon-plugins repository on your virtual machine :\n\u003e ```\n\u003e git clone https://github.com/centreon/centreon-plugins.git\n\u003e cp -R centreon-plugins/src/* /usr/lib/centreon/plugins/\n\u003e chmod +x /usr/lib/centreon/plugins/centreon_plugins.pl\n\u003e ```\n\u003e Note that this step is not necessary to inject data in database.\n\n## Dependencies installation\n\nInstall PHP dependencies :\n\n```bash\ncomposer install\n```\n\n## Configuration\n\nIf you want to change the data in the following file `data.yaml`, you\nneed to create a new file named `data.override.yml` with the same structure\nwith data changed and pass it as an argument.\n\nIf you are not using docker and you want to change the DATABASE_URL, you\ncan create a `.env.local` file with the following content for example :\n\n```dotenv\nDATABASE_URL=mysql://\u003cuser\u003e:\u003cpassword\u003e@\u003cip_address\u003e:\u003cport\u003e/\u003cdatabase_name\u003e\n```\n\nThis file will be charged automatically by the command.\n\n## Usage\n\n### Basic usage\n\nWithout custom configuration :\n\n```shell\n./bin/console centreon:inject-data\n```\n\nCustom configuration with a `data.override.yml` file to custom data :\n\n```shell\n./bin/console centreon:inject-data -c data.override.yml\n```\n\n### Use centreon injector with Docker\n\n```shell\ndocker run -it -p xx:xx -v /var/run/docker.sock:/var/run/docker.sock -v centreon-injector:/src docker.centreon.com/centreon/injector:1.0 composer install \u0026\u0026 bin/console centreon:inject-data\"\n```\n\nYou can custom your command with a `.env.local` file and a `data.override.yml` file as explained above.\n\n### Available arguments to pass to the command\n\n```shell\n./bin/console centreon:inject-data [options]\n\nOptions:\n      --docker                                 Start docker container instead of configured database connection\n  -i, --docker-image[=DOCKER-IMAGE]            Docker image to use [default: \"docker.centreon.com/centreon/centreon-web-alma9:develop\"]\n      --container-id[=CONTAINER-ID]            Existing container id to use\n  -c, --configurationFile[=CONFIGURATIONFILE]  Configuration file path [default: \"data.yaml\"]\n  -p, --purge                                  Purge data\n      --docker-http-port[=DOCKER-HTTP-PORT]    Docker http port to use [default: \"80\"]\n      --docker-label[=DOCKER-LABEL]            Docker label to set [default: \"injector\"]\n  -h, --help                                   Display help for the given command. When no command is given display help for the list command\n  -q, --quiet                                  Do not output any message\n  -V, --version                                Display this application version\n      --ansi|--no-ansi                         Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction                         Do not ask any interactive question\n  -e, --env=ENV                                The Environment name. [default: \"dev\"]\n      --no-debug                               Switch off debug mode.\n  -v|vv|vvv, --verbose                         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentreon%2Fcentreon-injector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentreon%2Fcentreon-injector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentreon%2Fcentreon-injector/lists"}