diff --git a/jmonitor/jmonitor-bundle/1.0/config/packages/jmonitor.yaml b/jmonitor/jmonitor-bundle/1.0/config/packages/jmonitor.yaml new file mode 100644 index 00000000..5895658c --- /dev/null +++ b/jmonitor/jmonitor-bundle/1.0/config/packages/jmonitor.yaml @@ -0,0 +1,29 @@ +jmonitor: + # project_api_key can be empty to disable sending data to Jmonitor + # useful for testing pourposes in non-production environments + project_api_key: '%env(JMONITOR_API_KEY)%' + + # Optional (recommended): use a specific logger service (Symfony's default is "logger"). + logger: 'logger' + + # Optional: provide a custom HTTP client service + # http_client: 'http_client' + +when@dev: + jmonitor: + collectors: + # Start with a basic collector for testing purposes + # On non-linux OS, you can use RandomAdapter for testing purposes + # system: + # enabled: true + # adapter: "Jmonitor\\Collector\\System\\Adapter\\RandomAdapter" + system: + enabled: true + +when@prod: + jmonitor: + # Add collectors configured for production here + # Refer to the package documentation for all available collectors: https://github.com/jmonitor/jmonitor-bundle + collectors: + system: + enabled: true diff --git a/jmonitor/jmonitor-bundle/1.0/config/routes/jmonitor.yaml b/jmonitor/jmonitor-bundle/1.0/config/routes/jmonitor.yaml new file mode 100644 index 00000000..41e634f1 --- /dev/null +++ b/jmonitor/jmonitor-bundle/1.0/config/routes/jmonitor.yaml @@ -0,0 +1,11 @@ +jmonitor_expose_php_metrics: + path: '/jmonitor/php-metrics' + controller: Jmonitor\JmonitorBundle\Controller\JmonitorPhpController + +# Secured route in production with localhost host restriction +# Refer to symfony docs for more information about security +when@prod: + jmonitor_expose_php_metrics: + path: '/jmonitor/php-metrics' + controller: Jmonitor\JmonitorBundle\Controller\JmonitorPhpController + host: localhost diff --git a/jmonitor/jmonitor-bundle/1.0/manifest.json b/jmonitor/jmonitor-bundle/1.0/manifest.json new file mode 100644 index 00000000..2be1d1d8 --- /dev/null +++ b/jmonitor/jmonitor-bundle/1.0/manifest.json @@ -0,0 +1,16 @@ +{ + "bundles": { + "Jmonitor\\JmonitorBundle\\JmonitorBundle": ["dev", "prod"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "JMONITOR_API_KEY": "" + }, + "dotenv": { + "prod": { + "JMONITOR_API_KEY": "" + } + } +}