> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reload Configuration and Verify Onboarding

> Learn how monit-agent configuration changes take effect and how to troubleshoot monitoring objects that do not appear in the console

Different `monit-agent` configuration changes take effect in different ways. This guide explains when to reload, when to restart, and how to confirm that monitoring objects have been onboarded successfully.

## Configuration reload rules

| Change                                                                                                             | How it takes effect   |
| ------------------------------------------------------------------------------------------------------------------ | --------------------- |
| Host collection, MySQL, Redis, PostgreSQL, MongoDB, Kafka, Elasticsearch, and other configurations in `agent.yaml` | Send SIGHUP to reload |
| Edge address, Basic Auth, TLS, `hostLocator`, audit directory                                                      | Restart the Agent     |

Send SIGHUP:

```bash theme={null}
sudo systemctl kill -s HUP monitagent
```

Restart the service:

```bash theme={null}
sudo systemctl restart monitagent
```

<Note>
  If you only add or adjust object configuration in `agent.yaml`, use SIGHUP reload first. Restart is needed only when startup parameters or service-level parameters change.
</Note>

## Verify successful onboarding

After the Agent starts, a host object usually appears on the monitoring object page within a few seconds.

If the page is still empty, check the following in order:

<Steps>
  <Step title="Check whether the Agent is running">
    ```bash theme={null}
    sudo systemctl status monitagent
    ```
  </Step>

  <Step title="Check whether the Edge address is correct">
    Make sure the address includes `ws://` or `wss://`, and confirm that the Edge for the current tenant is online.
  </Step>

  <Step title="View Agent logs">
    ```bash theme={null}
    sudo journalctl -u monitagent -n 100
    ```
  </Step>

  <Step title="Check agent.yaml">
    If `agent.yaml` was modified, confirm that the file has no YAML syntax errors.
  </Step>
</Steps>

## Checks when objects do not appear

| Symptom                                              | What to check                                                                                                                       |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Monitoring object page is empty                      | First confirm whether the host object appears. If no host object appears, check the Agent process, Edge address, and logs first.    |
| A database or middleware object type does not appear | Check the corresponding `targets`, `locator_mappings`, and credential file configuration.                                           |
| Elasticsearch object does not appear                 | Confirm that the cluster is reachable. The Agent must obtain `cluster_name` through `GET _cluster/health` during startup or reload. |
| Object address appears as `localhost` or `127.0.0.1` | Configure `locator_mappings` for the target and map it to a fixed private IP, DNS name, or `host:port`.                             |

## Recommended onboarding order

1. Onboard only the host object first.
2. After the host appears in the console, gradually add database objects such as MySQL, Redis, and PostgreSQL.
3. After each object appears, enable controlled query tools such as `mysql.query`, `redis.command`, `postgres.query`, `mongodb.command`, and `elasticsearch.cat` only when needed.

## Related docs

<CardGroup cols={2}>
  <Card title="Monitoring Objects Overview" icon="desktop" href="/en/monitors/targets/overview">
    Learn how monitoring objects and monit-agent work.
  </Card>

  <Card title="Configure Monitoring Objects" icon="sliders" href="/en/monitors/targets/configure-targets">
    View configuration examples and recommendations for each object type in agent.yaml.
  </Card>
</CardGroup>
