An open API service indexing awesome lists of open source software.

https://github.com/codex-team/hawk.mono

Open-source errors tracker
https://github.com/codex-team/hawk.mono

errors-handling monitoring

Last synced: about 2 months ago
JSON representation

Open-source errors tracker

Awesome Lists containing this project

README

        

# Hawk

Error tracking service

![Right col](https://github.com/user-attachments/assets/2d97cbdc-d828-43de-85fc-c830726c60bf)

This repo contains all subrepos of Hawk modules except Client SDKs (Catchers). It is used for developmnet purposes but also can be used to self-host Hawk.

## Documentation

- [How to use hawk.mono to run local Hawk](docs/how-to-run-local-hawk.md)
- [How to send testing events to the local hawk](docs/how-to-get-events.md)
- [How to view Registry queues](docs/how-to-view-registry-queues.md)

## How to run

1. Run `git submodule init && git submodule update`.
2. Create `.env` file in those repositories where there is `.env.sample` file.
3. Run `docker-compose up` to run all hawk services or list only the necessary services in the command above.

## Troubleshooting

If something went wrong, check this items.

### /api dir is empty after using ./pull-all-submodules.sh

```
git submodule update --remote --merge
```

### `docker-compose up` failed

There can be a problems if docker has an outdated image or volume. You can try rebuild it.

#### Removing and image

Try this commands:

```bash
docker-compose build --no-cache
```

service are `garage` or `api` etc (see [docker-compose.yml](/docker-compose.yml) -> services)

If it does not help, remove docker image and build again:

1. List all images:

```bash
docker ps | grep hawk
```

2. Copy image name

3. Remove an image

```bash
docker image rm
```

4. Rebuild

```bash
docker-compose up
```

#### Removing a volume

1. List all volumes:

```bash
docker volume ls
```

2. Find a volume you want to remove. For example, `hawkmono_api-deps`

3. Remove volume

```
docker volume rm hawkmono_api-deps
```

4. Build

```bash
docker-compose build api
```

## Executing Powershell scripts on Windows
To use Powershell scripts, you need to change the script execution policy in the system. Execute next command in Powershell terminal as administrator:

```powershell
Set-ExecutionPolicy RemoteSigned
```

### Pull all submodules
Run `pull-all-submodules.ps1` script:

```powershell
.\pull-all-submodules.ps1
```

### Restore mongo data
Add your dump to `dump\` folder and run `mongorestore.ps1` script with collection name as parameter:

```powershell
# Restore accounts data:
.\mongorestore.ps1 accounts

# Restore events data:
.\mongorestore.ps1 events
```