Compare commits
13 Commits
@nhost/rea
...
@nhost/rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
257815d519 | ||
|
|
55d8bb5a89 | ||
|
|
18f942f464 | ||
|
|
2a2e54c4d8 | ||
|
|
6a735523b4 | ||
|
|
4d6b7228d9 | ||
|
|
3dcbacf188 | ||
|
|
5c2269ef92 | ||
|
|
52a38feca7 | ||
|
|
f218058c89 | ||
|
|
dda0c67fa4 | ||
|
|
db2f44d7c0 | ||
|
|
9735fa238b |
28
.github/workflows/gen_ai_review.yaml
vendored
Normal file
28
.github/workflows/gen_ai_review.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: "gen: AI review"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, ready_for_review]
|
||||
issue_comment:
|
||||
jobs:
|
||||
pr_agent_job:
|
||||
if: ${{ github.event.sender.type != 'Bot' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
name: Run pr agent on every pull request, respond to user comments
|
||||
steps:
|
||||
- name: PR Agent action step
|
||||
id: pragent
|
||||
uses: Codium-ai/pr-agent@v0.24
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
config.max_model_tokens: 100000
|
||||
config.model: "anthropic/claude-3-5-sonnet-20240620"
|
||||
config.model_turbo: "anthropic/claude-3-5-sonnet-20240620"
|
||||
ignore.glob: "['pnpm-lock.yaml','**/pnpm-lock.yaml']"
|
||||
@@ -2,5 +2,5 @@
|
||||
// $schema provides code completion hints to IDEs.
|
||||
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
|
||||
"moderate": true,
|
||||
"allowlist": ["vue-template-compiler", "micromatch"]
|
||||
"allowlist": ["vue-template-compiler", "micromatch", "path-to-regexp"]
|
||||
}
|
||||
|
||||
@@ -24,3 +24,4 @@ NEXT_PUBLIC_ZENDESK_USER_EMAIL=
|
||||
|
||||
CODEGEN_GRAPHQL_URL=https://local.graphql.nhost.run/v1
|
||||
CODEGEN_HASURA_ADMIN_SECRET=nhost-admin-secret
|
||||
NEXT_PUBLIC_TURNSTILE_SITE_KEY=FIXME
|
||||
@@ -1,5 +1,32 @@
|
||||
# @nhost/dashboard
|
||||
|
||||
## 1.29.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 55d8bb5: feat: integrate turnstile for signup verification
|
||||
- 2a2e54c: fix: update docs url in run services form tooltip
|
||||
- 18f942f: fix: display long error messages in error toast without overflow
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react-apollo@13.0.0
|
||||
- @nhost/nextjs@2.1.22
|
||||
|
||||
## 1.28.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
- Updated dependencies [52a38fe]
|
||||
- @nhost/nextjs@2.1.21
|
||||
|
||||
## 1.28.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 9735fa2: chore: remove broken link
|
||||
|
||||
## 1.28.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
2
dashboard/next-env.d.ts
vendored
2
dashboard/next-env.d.ts
vendored
@@ -2,4 +2,4 @@
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "1.28.0",
|
||||
"version": "1.29.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
@@ -35,6 +35,7 @@
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@hookform/resolvers": "^3.3.4",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@marsidev/react-turnstile": "^1.0.2",
|
||||
"@mui/base": "5.0.0-beta.31",
|
||||
"@mui/material": "^5.15.14",
|
||||
"@mui/system": "^5.15.14",
|
||||
@@ -65,7 +66,7 @@
|
||||
"graphql-ws": "^5.16.0",
|
||||
"just-kebab-case": "^4.2.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"next": "^14.1.4",
|
||||
"next": "^14.2.10",
|
||||
"next-seo": "^6.5.0",
|
||||
"node-pg-format": "^1.3.5",
|
||||
"pluralize": "^8.0.0",
|
||||
@@ -165,7 +166,7 @@
|
||||
"tailwindcss": "^3.4.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
||||
"vite": "^5.2.7",
|
||||
"vite": "^5.4.6",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"vitest": "^0.32.4"
|
||||
},
|
||||
|
||||
@@ -112,18 +112,24 @@ export default function ErrorToast({
|
||||
bounce: 0.1,
|
||||
}}
|
||||
>
|
||||
<div className="flex w-full flex-row items-center justify-between space-x-4">
|
||||
<button onClick={close} type="button" aria-label="Close">
|
||||
<div className="flex w-full flex-row items-center justify-between gap-4">
|
||||
<button
|
||||
className="flex-shrink-0"
|
||||
onClick={close}
|
||||
type="button"
|
||||
aria-label="Close"
|
||||
>
|
||||
<XIcon className="h-4 w-4 text-white" />
|
||||
</button>
|
||||
<span>
|
||||
<span className="flex-grow overflow-hidden break-words">
|
||||
{msg ?? 'An unkown error has occured, please try again later!'}
|
||||
</span>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowInfo(!showInfo)}
|
||||
className="flex flex-row items-center justify-center space-x-2 text-white"
|
||||
className="flex flex-shrink-0 flex-row items-center justify-center space-x-2 text-white"
|
||||
aria-label="Show error details"
|
||||
>
|
||||
<span>Info</span>
|
||||
{showInfo ? (
|
||||
|
||||
@@ -12,7 +12,6 @@ import { Chip } from '@/components/ui/v2/Chip';
|
||||
import { Divider } from '@/components/ui/v2/Divider';
|
||||
import { Dropdown } from '@/components/ui/v2/Dropdown';
|
||||
import { IconButton } from '@/components/ui/v2/IconButton';
|
||||
import { ArrowRightIcon } from '@/components/ui/v2/icons/ArrowRightIcon';
|
||||
import { DotsHorizontalIcon } from '@/components/ui/v2/icons/DotsHorizontalIcon';
|
||||
import { LockIcon } from '@/components/ui/v2/icons/LockIcon';
|
||||
import { PencilIcon } from '@/components/ui/v2/icons/PencilIcon';
|
||||
@@ -20,7 +19,6 @@ import { PlusIcon } from '@/components/ui/v2/icons/PlusIcon';
|
||||
import { TerminalIcon } from '@/components/ui/v2/icons/TerminalIcon';
|
||||
import { TrashIcon } from '@/components/ui/v2/icons/TrashIcon';
|
||||
import { UsersIcon } from '@/components/ui/v2/icons/UsersIcon';
|
||||
import { Link } from '@/components/ui/v2/Link';
|
||||
import { List } from '@/components/ui/v2/List';
|
||||
import { ListItem } from '@/components/ui/v2/ListItem';
|
||||
import { Option } from '@/components/ui/v2/Option';
|
||||
@@ -312,15 +310,6 @@ function DataBrowserSidebarContent({
|
||||
Your project is connected to GitHub. Please use the CLI to make
|
||||
schema changes.
|
||||
</Text>
|
||||
<Link
|
||||
href="https://docs.nhost.io/platform/github-integration"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
underline="hover"
|
||||
className="grid items-center justify-start grid-flow-col gap-1"
|
||||
>
|
||||
Learn More <ArrowRightIcon />
|
||||
</Link>
|
||||
</Box>
|
||||
)}
|
||||
{!isSelectedSchemaLocked && (
|
||||
|
||||
@@ -70,7 +70,7 @@ export default function ComputeFormSection({
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://docs.nhost.io/run/resources"
|
||||
href="https://docs.nhost.io/guides/run/resources"
|
||||
className="underline"
|
||||
>
|
||||
resources
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function ReplicasFormSection() {
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://docs.nhost.io/run/resources"
|
||||
href="https://docs.nhost.io/guides/run/resources"
|
||||
className="underline"
|
||||
>
|
||||
resources
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Text } from '@/components/ui/v2/Text';
|
||||
import { getToastStyleProps } from '@/utils/constants/settings';
|
||||
import { nhost } from '@/utils/nhost';
|
||||
import { yupResolver } from '@hookform/resolvers/yup';
|
||||
import { Turnstile } from '@marsidev/react-turnstile';
|
||||
import { styled } from '@mui/material';
|
||||
import { useSignUpEmailPassword } from '@nhost/nextjs';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -39,6 +40,9 @@ export default function SignUpPage() {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
// x-cf-turnstile-response
|
||||
const [turnstileResponse, setTurnstileResponse] = useState(null);
|
||||
|
||||
const form = useForm<SignUpFormValues>({
|
||||
reValidateMode: 'onSubmit',
|
||||
defaultValues: {
|
||||
@@ -66,11 +70,27 @@ export default function SignUpPage() {
|
||||
password,
|
||||
displayName,
|
||||
}: SignUpFormValues) {
|
||||
if (!turnstileResponse) {
|
||||
toast.error(
|
||||
'Please complete the signup verification challenge to continue.',
|
||||
getToastStyleProps(),
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const { needsEmailVerification } = await signUpEmailPassword(
|
||||
email,
|
||||
password,
|
||||
{ displayName },
|
||||
{
|
||||
displayName,
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
'x-cf-turnstile-response': turnstileResponse,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
if (needsEmailVerification) {
|
||||
@@ -94,7 +114,7 @@ export default function SignUpPage() {
|
||||
Sign Up
|
||||
</Text>
|
||||
|
||||
<Box className="grid grid-flow-row gap-4 rounded-md border bg-transparent p-6 lg:p-12">
|
||||
<Box className="grid grid-flow-row gap-4 p-6 bg-transparent border rounded-md lg:p-12">
|
||||
<Button
|
||||
variant="borderless"
|
||||
className="!bg-white !text-black hover:ring-2 hover:ring-white hover:ring-opacity-50 disabled:!text-black disabled:!text-opacity-60"
|
||||
@@ -122,7 +142,7 @@ export default function SignUpPage() {
|
||||
|
||||
<div className="relative py-2">
|
||||
<Text
|
||||
className="absolute left-0 right-0 top-1/2 mx-auto w-12 -translate-y-1/2 bg-black px-2 text-center text-sm"
|
||||
className="absolute left-0 right-0 w-12 px-2 mx-auto text-sm text-center -translate-y-1/2 bg-black top-1/2"
|
||||
color="disabled"
|
||||
>
|
||||
OR
|
||||
@@ -172,6 +192,12 @@ export default function SignUpPage() {
|
||||
helperText={formState.errors.password?.message}
|
||||
/>
|
||||
|
||||
<Turnstile
|
||||
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY}
|
||||
options={{ theme: 'dark', size: 'flexible' }}
|
||||
onSuccess={setTurnstileResponse}
|
||||
/>
|
||||
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
@@ -188,7 +214,7 @@ export default function SignUpPage() {
|
||||
|
||||
<Divider className="!my-2" />
|
||||
|
||||
<Text color="secondary" className="text-center text-sm">
|
||||
<Text color="secondary" className="text-sm text-center">
|
||||
By signing up, you agree to our{' '}
|
||||
<NavLink
|
||||
href="https://nhost.io/legal/terms-of-service"
|
||||
@@ -212,7 +238,7 @@ export default function SignUpPage() {
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
<Text color="secondary" className="text-center text-base lg:text-lg">
|
||||
<Text color="secondary" className="text-base text-center lg:text-lg">
|
||||
Already have an account?{' '}
|
||||
<NavLink href="/signin" color="white" className="font-medium">
|
||||
Sign In
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost/docs
|
||||
|
||||
## 2.17.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: added pg_ivm extension
|
||||
|
||||
## 2.17.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db2f44d: fix: update rate-limit to reflect reality
|
||||
- dda0c67: chore: udpate metrics documentation with managed configuration
|
||||
|
||||
## 2.17.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -159,6 +159,32 @@ DROP EXTENSION pg_hashids;
|
||||
|
||||
- [GitHub](https://github.com/iCyberon/pg_hashids)
|
||||
|
||||
## pg_ivm
|
||||
|
||||
The pg_ivm module provides Incremental View Maintenance (IVM) feature for PostgreSQL.
|
||||
|
||||
Incremental View Maintenance (IVM) is a way to make materialized views up-to-date in which only incremental changes are computed and applied on views rather than recomputing the contents from scratch as REFRESH MATERIALIZED VIEW does. IVM can update materialized views more efficiently than recomputation when only small parts of the view are changed.
|
||||
|
||||
### Managing
|
||||
|
||||
To install the extension you can create a migration with the following contents:
|
||||
|
||||
```sql SQL
|
||||
SET ROLE postgres;
|
||||
CREATE EXTENSION pg_ivm;
|
||||
```
|
||||
|
||||
To uninstall it, you can use the following migration:
|
||||
|
||||
```sql SQL
|
||||
SET ROLE postgres;
|
||||
DROP EXTENSION pg_ivm;
|
||||
```
|
||||
|
||||
### Resources
|
||||
|
||||
- [GitHub](https://github.com/sraoss/pg_ivm)
|
||||
|
||||
## pg_squeeze
|
||||
|
||||
PostgreSQL extension that removes unused space from a table and optionally sorts tuples according to particular index (as if CLUSTER command was executed concurrently with regular reads / writes). In fact we try to replace pg_repack extension.
|
||||
|
||||
BIN
docs/images/platform/metrics/alert_rules.png
Normal file
BIN
docs/images/platform/metrics/alert_rules.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 532 KiB |
BIN
docs/images/platform/metrics/contact_points.png
Normal file
BIN
docs/images/platform/metrics/contact_points.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 392 KiB |
BIN
docs/images/platform/metrics/email_notification.png
Normal file
BIN
docs/images/platform/metrics/email_notification.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 255 KiB |
@@ -76,11 +76,7 @@
|
||||
"platform/subdomain",
|
||||
"platform/compute-resources",
|
||||
"platform/service-replicas",
|
||||
{
|
||||
"group": "Monitoring",
|
||||
"icon": "monitor-waveform",
|
||||
"pages": ["platform/metrics"]
|
||||
},
|
||||
"platform/metrics",
|
||||
"platform/environment-variables",
|
||||
"platform/secrets",
|
||||
"platform/deployments",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/docs",
|
||||
"version": "2.17.0",
|
||||
"version": "2.17.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "mintlify dev"
|
||||
|
||||
@@ -4,6 +4,10 @@ description: 'Grafana Instance configured and tailored to your project'
|
||||
icon: monitor-waveform
|
||||
---
|
||||
|
||||
<Info>
|
||||
This is a Pro/Team/Enterprise feature. This is not available on Starter projects.
|
||||
</Info>
|
||||
|
||||
Insights such as response times, resource usage, and error rates, to help you assess the **performance** and **health** of your services.
|
||||
|
||||
Metrics helps you analyze the performance of your infrastructure, while identifying bottlenecks and optimizing your applications.
|
||||
@@ -23,16 +27,130 @@ Your Grafana instance comes pre-defined with dashboards that cover backend servi
|
||||
|
||||

|
||||
|
||||
### Nhost Dashboard
|
||||
## Accessing Grafana
|
||||
|
||||
You can find the link to Grafana in your project's dashboard, under **Metrics**.
|
||||
You can find the link to Grafana in your project's dashboard, under **Metrics**.
|
||||
|
||||

|
||||
|
||||
## Configuring Grafana
|
||||
|
||||
Grafana comes pre-configured with a datasource with your project's metrics plus a few useful dashboards to observe your projects. In addition, you can enable alerting by configuring one or more contact points and enabling alerts in your configuration file.
|
||||
|
||||
<Info>
|
||||
The configuration below is open source and can be found [here](https://github.com/nhost/nhost/tree/main/observability/grafana). If you want to see improvements, more rules, better dashboards, more options, etc., don't hesitate to contribute them or open an issue.
|
||||
</Info>
|
||||
|
||||
### Configure contact points
|
||||
|
||||
Contact points in Grafana are lists of integrations that send notifications to specific channels or services when alerts are triggered. Supported contact points are:
|
||||
|
||||
- email
|
||||
- pagerduty
|
||||
- discord
|
||||
- slack
|
||||
- webhooks
|
||||
|
||||
To configure them include one ore more sections in your configuration file:
|
||||
|
||||
|
||||
```toml
|
||||
[observability.grafana.contacts]
|
||||
emails = ['engineering@acme.com']
|
||||
|
||||
[[observability.grafana.contacts.pagerduty]]
|
||||
integrationKey = 'integration-key'
|
||||
severity = 'critical'
|
||||
class = 'infra'
|
||||
component = 'backend'
|
||||
group = 'group'
|
||||
|
||||
[[observability.grafana.contacts.discord]]
|
||||
url = 'https://discord.com/api/webhooks/...'
|
||||
avatarUrl = 'https://discord.com/api/avatar/...'
|
||||
|
||||
[[observability.grafana.contacts.slack]]
|
||||
recipient = 'recipient'
|
||||
token = 'token'
|
||||
username = 'username'
|
||||
iconEmoji = 'danger'
|
||||
iconURL = 'https://...'
|
||||
mentionUsers = ['user1', 'user2']
|
||||
mentionGroups = ['group1', 'group2']
|
||||
mentionChannel = 'channel'
|
||||
url = 'https://slack.com/api/webhooks/...'
|
||||
endpointURL = 'https://slack.com/api/endpoint/...'
|
||||
|
||||
[[observability.grafana.contacts.webhook]]
|
||||
url = 'https://webhook.example.com'
|
||||
httpMethod = 'POST'
|
||||
username = 'user'
|
||||
password = 'password'
|
||||
authorizationScheme = 'Bearer'
|
||||
authorizationCredentials = 'token'
|
||||
maxAlerts = 10
|
||||
```
|
||||
|
||||
Once you have added them to your configuration and deployed them you should be able to see them in your grafana dashboard under "Settings" -> "Contact points" -> "Nhost Managed Contacts":
|
||||
|
||||

|
||||
|
||||
If you click on "View" you should be able to see a test button you can use to ensure your contacts are properly configured.
|
||||
|
||||
### SMTP
|
||||
|
||||
If you are planning to send emails as part of your alerting, you need to configure some SMTP settings as well. To do so add to your configuration:
|
||||
|
||||
```toml
|
||||
[observability.grafana.smtp]
|
||||
host = 'localhost'
|
||||
port = 25
|
||||
sender = 'admin@localhost'
|
||||
user = 'smtpUser'
|
||||
password = 'smtpPassword'
|
||||
```
|
||||
|
||||
### Alerting
|
||||
|
||||
To enable alerting simply add to your configuration:
|
||||
|
||||
```toml
|
||||
[observability.grafana.alerting]
|
||||
enabled = true
|
||||
```
|
||||
|
||||
This will enable the following rules, which you can find in your grafana dashboard under "Alert rules":
|
||||
|
||||

|
||||
|
||||
1. **High CPU usage**
|
||||
- Trigger: CPU usage > 75%
|
||||
- Duration: Sustained for 5-10 minutes
|
||||
|
||||
2. **Low disk space**
|
||||
- Trigger: Disk utilization > 75%
|
||||
- Duration: Persistent for 5-10 minutes
|
||||
|
||||
3. **Low free memory**
|
||||
- Trigger: Memory usage > 75%
|
||||
- Duration: Continuous for 5-10 minutes
|
||||
|
||||
4. **Service restarted due to lack of memory**
|
||||
- Trigger: Any service restart due to memory exhaustion
|
||||
- Duration: Immediate upon occurrence
|
||||
|
||||
5. **High request error rate**
|
||||
- Trigger: Request error rate > 25%
|
||||
- Duration: Maintained for 5-10 minutes
|
||||
|
||||
After they have been enabling they will start notifying your contact points when the conditions are met. For instance, here is an email sent due to a high error rate:
|
||||
|
||||

|
||||
|
||||
## Advanced configuration
|
||||
|
||||
In addition, Team and Enterprise projects can perform any changes they want. For instance you can add users, configure an OAuth provider for user authentication, add datasources, you can configure your own alerts, etc.
|
||||
|
||||
## Beta
|
||||
|
||||
Metrics is in beta, its functionality and pricing might change.
|
||||
|
||||
### Limitations
|
||||
|
||||
- Dashboards can be updated or created, but they won't persist after a deployment.
|
||||
|
||||
@@ -45,7 +45,7 @@ Given that not all endpoints are equally sensitive, Auth supports more complex r
|
||||
|
||||
| Endpoints | Key | Limits | Description | Minimum version |
|
||||
| ----------------------|-----|--------|-------------|-----------------|
|
||||
| Any that sends emails<sup>1</sup> | Global | 50 / hour | Not configurable. This limit applies to any project without custom SMTP settings | 0.33.0 |
|
||||
| Any that sends emails<sup>1</sup> | Global | 10 / hour | Not configurable. This limit applies to any project without custom SMTP settings | 0.33.0 |
|
||||
| Any that sends emails<sup>1</sup> | Client IP | 10 / hour | Configurable. This limit applies to any project with custom SMTP settings and is configurable | 0.33.0 |
|
||||
| Any that sends SMS<sup>2</sup> | Client IP | 10 / hour | Configurable. | 0.33.0 |
|
||||
| Any endpoint that an attacker may try to brute-force. This includes sign-in and verify endpoints<sup>3</sup> | Client IP | 10 / 5 minutes | Configurable | 0.33.0 |
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/cli
|
||||
|
||||
## 0.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 0.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/cli",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.12",
|
||||
"main": "src/index.mjs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @nhost-examples/codegen-react-apollo
|
||||
|
||||
## 0.4.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/react-apollo@13.0.0
|
||||
|
||||
## 0.4.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.4.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-apollo",
|
||||
"version": "0.4.11",
|
||||
"version": "0.4.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"codegen": "graphql-codegen",
|
||||
@@ -36,6 +36,6 @@
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^5.2.7"
|
||||
"vite": "^5.4.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost-examples/codegen-react-query
|
||||
|
||||
## 0.4.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
|
||||
## 0.4.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.4.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-query",
|
||||
"version": "0.4.11",
|
||||
"version": "0.4.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"codegen": "graphql-codegen",
|
||||
@@ -37,6 +37,6 @@
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^5.2.7"
|
||||
"vite": "^5.4.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @nhost-examples/react-urql
|
||||
|
||||
## 0.3.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/react-urql@10.0.0
|
||||
|
||||
## 0.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-urql",
|
||||
"private": true,
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.13",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
@@ -30,6 +30,6 @@
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^5.2.7"
|
||||
"vite": "^5.4.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @nhost-examples/multi-tenant-one-to-many
|
||||
|
||||
## 2.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 2.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 2.2.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/multi-tenant-one-to-many",
|
||||
"private": true,
|
||||
"version": "2.2.11",
|
||||
"version": "2.2.13",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
@@ -10,7 +10,7 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.21",
|
||||
"express": "^4.19.2",
|
||||
"express": "^4.20.0",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# @nhost-examples/nextjs
|
||||
|
||||
## 0.3.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/react-apollo@13.0.0
|
||||
- @nhost/nextjs@2.1.22
|
||||
|
||||
## 0.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
- Updated dependencies [52a38fe]
|
||||
- @nhost/nextjs@2.1.21
|
||||
|
||||
## 0.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
2
examples/nextjs/next-env.d.ts
vendored
2
examples/nextjs/next-env.d.ts
vendored
@@ -2,4 +2,4 @@
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/nextjs",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@nhost/react": "workspace:^",
|
||||
"@nhost/react-apollo": "workspace:^",
|
||||
"graphql": "16.8.1",
|
||||
"next": "^14.1.4",
|
||||
"next": "^14.2.10",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-icons": "^4.12.0"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/node-storage
|
||||
|
||||
## 0.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 0.2.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/node-storage",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"private": true,
|
||||
"description": "This is an example of how to use the Storage with Node.js",
|
||||
"main": "src/index.mjs",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @nhost-examples/nextjs-server-components
|
||||
|
||||
## 0.4.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 0.4.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.4.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/nextjs-server-components",
|
||||
"version": "0.4.12",
|
||||
"version": "0.4.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
@@ -18,7 +18,7 @@
|
||||
"form-data": "^4.0.0",
|
||||
"graphql": "16.8.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"next": "^14.1.4",
|
||||
"next": "^14.2.10",
|
||||
"postcss": "^8.4.38",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
---
|
||||
|
||||
## 0.4.1
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.4.0
|
||||
### Minor Changes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/sveltekit",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
@@ -29,7 +29,7 @@
|
||||
"svelte-check": "^3.6.8",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^5.4.3",
|
||||
"vite": "^5.2.7",
|
||||
"vite": "^5.4.6",
|
||||
"vitest": "^0.25.8"
|
||||
},
|
||||
"type": "module",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# @nhost-examples/react-apollo
|
||||
|
||||
## 1.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/react-apollo@13.0.0
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4d6b722: fix: add check for elevated permission before deleting a security key
|
||||
- 3dcbacf: fix: add elevated permission check before adding a security key
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-apollo",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -32,8 +32,8 @@
|
||||
"next-themes": "^0.3.0",
|
||||
"prism-react-renderer": "^2.3.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-code-block": "^1.0.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-hook-form": "^7.52.2",
|
||||
"react-router-dom": "^6.22.3",
|
||||
@@ -62,6 +62,6 @@
|
||||
"totp-generator": "^0.0.13",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^5.4.0"
|
||||
"vite": "^5.4.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ import { Form, FormControl, FormField, FormItem, FormMessage } from '@/component
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { ApolloError, gql, useMutation } from '@apollo/client'
|
||||
import { zodResolver } from '@hookform/resolvers/zod'
|
||||
import { useAddSecurityKey, useUserId } from '@nhost/react'
|
||||
import {
|
||||
useAddSecurityKey,
|
||||
useElevateSecurityKeyEmail,
|
||||
useUserEmail,
|
||||
useUserId
|
||||
} from '@nhost/react'
|
||||
import { useAuthQuery } from '@nhost/react-apollo'
|
||||
import { Fingerprint, Info, Plus, Trash } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
@@ -29,9 +34,11 @@ const addSecurityKeySchema = z.object({
|
||||
|
||||
export default function SecurityKeys() {
|
||||
const userId = useUserId()
|
||||
const [showAddSecurityKeyDialog, setShowAddSecurityDialog] = useState(false)
|
||||
const email = useUserEmail()
|
||||
const { add } = useAddSecurityKey()
|
||||
const [keys, setKeys] = useState<SecurityKey[]>([])
|
||||
const { elevated, elevateEmailSecurityKey } = useElevateSecurityKeyEmail()
|
||||
const [showAddSecurityKeyDialog, setShowAddSecurityDialog] = useState(false)
|
||||
|
||||
const { refetch: refetchSecurityKeys } = useAuthQuery<SecurityKeysQuery>(
|
||||
gql`
|
||||
@@ -52,30 +59,6 @@ export default function SecurityKeys() {
|
||||
}
|
||||
)
|
||||
|
||||
const form = useForm<z.infer<typeof addSecurityKeySchema>>({
|
||||
resolver: zodResolver(addSecurityKeySchema),
|
||||
defaultValues: {
|
||||
nickname: ''
|
||||
}
|
||||
})
|
||||
|
||||
const onSubmit = async (values: z.infer<typeof addSecurityKeySchema>) => {
|
||||
const { nickname } = values
|
||||
const { key, isError, error } = await add(nickname)
|
||||
|
||||
if (isError) {
|
||||
toast.error(error?.message)
|
||||
} else {
|
||||
if (key) {
|
||||
setKeys((previousKeys) => [...previousKeys, key])
|
||||
setShowAddSecurityDialog(false)
|
||||
}
|
||||
|
||||
form.reset()
|
||||
await refetchSecurityKeys()
|
||||
}
|
||||
}
|
||||
|
||||
const [removeKey] = useMutation<{
|
||||
deleteAuthUserSecurityKey?: {
|
||||
id: string
|
||||
@@ -97,7 +80,58 @@ export default function SecurityKeys() {
|
||||
}
|
||||
)
|
||||
|
||||
const form = useForm<z.infer<typeof addSecurityKeySchema>>({
|
||||
resolver: zodResolver(addSecurityKeySchema),
|
||||
defaultValues: {
|
||||
nickname: ''
|
||||
}
|
||||
})
|
||||
|
||||
const elevatePermission = async () => {
|
||||
if (!elevated && keys.length > 0) {
|
||||
try {
|
||||
const { elevated } = await elevateEmailSecurityKey(email as string)
|
||||
|
||||
if (!elevated) {
|
||||
throw new Error('Permissions were not elevated')
|
||||
}
|
||||
return true
|
||||
} catch {
|
||||
toast.error('Could not elevate permissions')
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true // Return true if already elevated or no keys
|
||||
}
|
||||
|
||||
const onSubmit = async (values: z.infer<typeof addSecurityKeySchema>) => {
|
||||
const { nickname } = values
|
||||
|
||||
const permissionGranted = await elevatePermission()
|
||||
|
||||
if (!permissionGranted) {
|
||||
return
|
||||
}
|
||||
|
||||
const { key, isError, error } = await add(nickname)
|
||||
|
||||
if (isError) {
|
||||
toast.error(error?.message)
|
||||
} else if (key) {
|
||||
setKeys((previousKeys) => [...previousKeys, key])
|
||||
setShowAddSecurityDialog(false)
|
||||
form.reset()
|
||||
await refetchSecurityKeys()
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeleteSecurityKey = async (id: string) => {
|
||||
const permissionGranted = await elevatePermission()
|
||||
|
||||
if (!permissionGranted) {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await removeKey({ variables: { id } })
|
||||
await refetchSecurityKeys()
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost-examples/react-gqty
|
||||
|
||||
## 1.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
|
||||
## 1.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 1.2.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-gqty",
|
||||
"private": true,
|
||||
"version": "1.2.11",
|
||||
"version": "1.2.13",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -27,6 +27,6 @@
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^5.2.7"
|
||||
"vite": "^5.4.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/react-native
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/react-apollo@13.0.0
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-native",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @nhost-examples/vue-apollo
|
||||
|
||||
## 0.6.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
- @nhost/apollo@7.1.7
|
||||
- @nhost/vue@2.6.7
|
||||
|
||||
## 0.6.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.6.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-apollo",
|
||||
"private": true,
|
||||
"version": "0.6.11",
|
||||
"version": "0.6.13",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
@@ -37,7 +37,7 @@
|
||||
"@xstate/inspect": "^0.6.5",
|
||||
"sass": "1.32.0",
|
||||
"typescript": "4.9.4",
|
||||
"vite": "^5.2.7",
|
||||
"vite": "^5.4.6",
|
||||
"vue-tsc": "^0.38.9"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost-examples/vue-quickstart
|
||||
|
||||
## 0.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@7.1.7
|
||||
- @nhost/vue@2.6.7
|
||||
|
||||
## 0.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 0.2.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-quickstart",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.13",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
@@ -35,7 +35,7 @@
|
||||
"unocss": "^0.33.5",
|
||||
"unplugin-auto-import": "^0.17.5",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.2.7",
|
||||
"vite": "^5.4.6",
|
||||
"vite-plugin-pages": "^0.28.0",
|
||||
"vue-tsc": "^0.38.9"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 7.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 7.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "7.1.6",
|
||||
"version": "7.1.7",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 13.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
- @nhost/apollo@7.1.7
|
||||
|
||||
## 12.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "12.0.6",
|
||||
"version": "13.0.0",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/react-urql
|
||||
|
||||
## 10.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
|
||||
## 9.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-urql",
|
||||
"version": "9.0.6",
|
||||
"version": "10.0.0",
|
||||
"description": "Nhost React URQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
58
observability/grafana/contact_points.yaml
Normal file
58
observability/grafana/contact_points.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
apiVersion: 1
|
||||
contactPoints:
|
||||
- orgId: 1
|
||||
name: Nhost Managed Contacts
|
||||
receivers:
|
||||
{{ if .Contacts.Emails }}
|
||||
- uid: 1
|
||||
type: email
|
||||
settings:
|
||||
addresses: {{ join .Contacts.Emails "," }}
|
||||
singleEmail: false
|
||||
sendReminder: true
|
||||
{{ end }}
|
||||
{{- range $i, $c := .Contacts.Pagerduty }}
|
||||
- uid: {{ add 100 $i }}
|
||||
type: pagerduty
|
||||
settings:
|
||||
integrationKey: {{ $c.IntegrationKey }}
|
||||
severity: {{ $c.Severity }}
|
||||
class: {{ $c.Class }}
|
||||
component: {{ $c.Component }}
|
||||
group: {{ $c.Group }}
|
||||
{{- end }}
|
||||
{{- range $i, $c := .Contacts.Discord }}
|
||||
- uid: {{ add 200 $i }}
|
||||
type: discord
|
||||
settings:
|
||||
url: {{ $c.URL }}
|
||||
avatar_url: {{ $c.AvatarURL }}
|
||||
use_discord_username: true
|
||||
{{- end }}
|
||||
{{- range $i, $c := .Contacts.Slack }}
|
||||
- uid: {{ add 300 $i }}
|
||||
type: slack
|
||||
settings:
|
||||
recipient: {{ $c.Recipient }}
|
||||
token: {{ $c.Token }}
|
||||
username: {{ $c.Username }}
|
||||
icon_emoji: {{ $c.IconEmoji }}
|
||||
icon_url: {{ $c.IconURL }}
|
||||
mentionUsers: {{ join $c.MentionUsers "," }}
|
||||
mentionGroups: {{ join $c.MentionGroups "," }}
|
||||
mentionChannel: {{ $c.MentionChannel }}
|
||||
url: {{ $c.URL }}
|
||||
endpointUrl: {{ $c.EndpointURL }}
|
||||
{{- end }}
|
||||
{{- range $i, $c := .Contacts.Webhook }}
|
||||
- uid: {{ add 400 $i }}
|
||||
type: webhook
|
||||
settings:
|
||||
url: {{ $c.URL }}
|
||||
httpMethod: {{ $c.HTTPMethod }}
|
||||
username: {{ $c.Username }}
|
||||
password: {{ $c.Password }}
|
||||
authorization_scheme: {{ $c.AuthorizationScheme }}
|
||||
authorization_credentials: {{ $c.AuthorizationCredentials }}
|
||||
maxAlerts: '{{ $c.MaxAlerts }}'
|
||||
{{- end }}
|
||||
@@ -44,7 +44,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -91,7 +91,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -108,7 +108,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -155,7 +155,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -172,7 +172,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -219,7 +219,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -249,7 +249,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of invocations by method/function",
|
||||
"fieldConfig": {
|
||||
@@ -327,13 +327,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(method, route) (increase(functions_requests_total{method=~\"$method\",route=~\"$route\"}[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{route}}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -344,7 +344,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of invocations by status response",
|
||||
"fieldConfig": {
|
||||
@@ -422,13 +422,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(status) (increase(functions_requests_total{method=~\"$method\",route=~\"$route\"}[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{status}}",
|
||||
"legendFormat": "{{ print "{{status}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -439,7 +439,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
@@ -518,12 +518,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(method, route) (increase(functions_bytes_sent{method=~\"$method\", route=~\"$route\"}[$__rate_interval])) / sum by(method, route) (increase(functions_requests_total{method=~\"$method\", route=~\"$route\"}[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -534,7 +534,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -601,7 +601,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -609,7 +609,7 @@
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{route}}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -634,7 +634,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Time the slowest response took",
|
||||
"fieldConfig": {
|
||||
@@ -712,12 +712,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "histogram_quantile(1, rate(functions_duration_seconds_bucket[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -728,7 +728,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "The 95th percentile of response times refers to the value below which 95% of response times fall. In other words, it is the point at which only 5% of response times are higher",
|
||||
"fieldConfig": {
|
||||
@@ -806,12 +806,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "histogram_quantile(0.95, rate(functions_duration_seconds_bucket[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -822,7 +822,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "The 75th percentile of response times refers to the value below which 75% of response times fall. In other words, it is the point at which 25% of response times are higher",
|
||||
"fieldConfig": {
|
||||
@@ -900,12 +900,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "histogram_quantile(0.75, rate(functions_duration_seconds_bucket[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -916,7 +916,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
@@ -994,12 +994,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "sum by(method, route) (increase(functions_duration_seconds_sum{method=~\"$method\", route=~\"$route\"}[$__rate_interval])) / sum by(method, route) (increase(functions_duration_seconds_count{method=~\"$method\", route=~\"$route\"}[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of invocations that failed divided by the total number of invocations",
|
||||
"fieldConfig": {
|
||||
@@ -1101,13 +1101,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(method, route) (increase(functions_requests_total{method=~\"$method\",route=~\"$route\",status=~\"^[4-5].*\"}[$__rate_interval])) / sum by(method, route) (increase(functions_requests_total[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{ route }}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -1118,7 +1118,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -1184,7 +1184,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -1192,7 +1192,7 @@
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{route}}",
|
||||
"legendFormat": "{{ print "{{ method }} - {{ route }}" }}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -1205,7 +1205,9 @@
|
||||
"refresh": false,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"nhost"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
@@ -1217,7 +1219,7 @@
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"definition": "label_values(functions_requests_total, method)",
|
||||
"hide": 0,
|
||||
@@ -1244,7 +1246,7 @@
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"definition": "label_values(functions_requests_total, route)",
|
||||
"hide": 0,
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "",
|
||||
"gridPos": {
|
||||
@@ -67,7 +67,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -144,12 +144,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(container,pod) (irate(container_cpu_usage_seconds_total{container=~\"hasura|hasura-graphi\"}[$__rate_interval])) * 1000",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}::{{container}}",
|
||||
"legendFormat": "{{ print "{{pod}}::{{container}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -160,7 +160,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -238,12 +238,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(container,pod) (container_memory_usage_bytes{container=~\"hasura|hasura-graphi\"})",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}::{{container}}",
|
||||
"legendFormat": "{{ print "{{pod}}::{{container}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -265,7 +265,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -342,7 +342,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(rate(graphql_requests_total{service=\"hasura-service\"}[$__rate_interval]))",
|
||||
@@ -354,13 +354,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(graphql_requests_total{service=\"hasura-service\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{operation}}::{{name}}::{{field}}",
|
||||
"legendFormat": "{{ print "{{operation}}::{{name}}::{{field}}" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -371,7 +371,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -448,7 +448,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "graphql_websocket_connections_started_total{service=\"hasura-service\"} - graphql_websocket_connections_completed_total{service=\"hasura-service\"}",
|
||||
@@ -460,7 +460,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(graphql_websocket_connections_started_total{service=\"hasura-service\"}[$__rate_interval])",
|
||||
@@ -473,7 +473,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(graphql_websocket_connections_completed_total{service=\"hasura-service\"}[$__rate_interval])",
|
||||
@@ -489,7 +489,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -567,12 +567,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "histogram_quantile(0.95, sum(rate(graphql_requests_duration_miliseconds_bucket{service=\"hasura-service\"}[$__rate_interval])) by (le,operation,name,field))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{operation}}::{{ name }}::{{field}}",
|
||||
"legendFormat": "{{ print "{{operation}}::{{ name }}::{{field}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -583,7 +583,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -660,12 +660,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(graphql_requests_total{service=\"hasura-service\", result=\"failure\"}[$__rate_interval])",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{operation}}::{{ name }}::{{field}}",
|
||||
"legendFormat": "{{ print "{{operation}}::{{ name }}::{{field}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -676,7 +676,9 @@
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"nhost"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
@@ -1,35 +1,4 @@
|
||||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_PROMETHEUS",
|
||||
"label": "Prometheus",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "prometheus",
|
||||
"pluginName": "Prometheus"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "9.2.0"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "prometheus",
|
||||
"name": "Prometheus",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "timeseries",
|
||||
"name": "Time series",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
@@ -75,7 +44,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of requests by method/function",
|
||||
"fieldConfig": {
|
||||
@@ -153,13 +122,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(method, ingress) (increase(nginx_ingress_controller_requests{method=~\"$method\",ingress=~\"$ingress\"}[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{ingress}}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -170,7 +139,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of requests by status response",
|
||||
"fieldConfig": {
|
||||
@@ -248,13 +217,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(status) (increase(nginx_ingress_controller_requests{method=~\"$method\",ingress=~\"$ingress\"}[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{status}}",
|
||||
"legendFormat": "{{ print "{{status}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -265,7 +234,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
@@ -344,12 +313,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(ingress, method) (increase(nginx_ingress_controller_response_size_sum{ingress=~\"$ingress\",method=~\"$method\"}[$__rate_interval])) / sum by(ingress, method) (increase(nginx_ingress_controller_requests{ingress=~\"$ingress\",method=~\"$method\"}[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ method }} - {{ ingress }}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -360,7 +329,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -427,7 +396,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -435,7 +404,7 @@
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ingress}} {{method}}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -460,7 +429,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
@@ -539,12 +508,12 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(method, ingress) (increase(nginx_ingress_controller_response_duration_seconds_sum{method=~\"$method\", ingress=~\"$ingress\"}[$__rate_interval])) / sum by(method, ingress) (increase(nginx_ingress_controller_response_duration_seconds_count{method=~\"$method\", ingress=~\"$ingress\"}[$__rate_interval]))",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ ingress }} - {{ method }}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -568,7 +537,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "Number of requests that failed divided by the total number of requests",
|
||||
"fieldConfig": {
|
||||
@@ -647,13 +616,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(ingress,method) (increase(nginx_ingress_controller_requests{ingress=~\"$ingress\",method=~\"$method\",status=~\"^[4-5].*\"}[$__rate_interval])) / sum by(ingress, method) (increase(nginx_ingress_controller_requests[$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{method}} {{ ingress }}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -664,7 +633,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -731,7 +700,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
@@ -739,7 +708,7 @@
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{ingress}} {{method}}",
|
||||
"legendFormat": "{{ print "{{method}} {{ingress}}" }}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -751,7 +720,9 @@
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"nhost"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
@@ -802,4 +773,4 @@
|
||||
"uid": "WOWEHb7Sz",
|
||||
"version": 16,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
@@ -1,41 +1,4 @@
|
||||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_PROMETHEUS",
|
||||
"label": "Prometheus",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "prometheus",
|
||||
"pluginName": "Prometheus"
|
||||
}
|
||||
],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "9.2.0"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "prometheus",
|
||||
"name": "Prometheus",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "text",
|
||||
"name": "Text",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "timeseries",
|
||||
"name": "Time series",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
@@ -62,7 +25,6 @@
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
@@ -82,7 +44,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
@@ -100,13 +62,13 @@
|
||||
"content": "This dashboard shows the overall resources used by every service in your project.\n\nMetrics service is currently in **beta** so things may change.\n\nKeep in mind that while you might be change settings, edit the dashboard or even create new ones these changes are not persisted. If you want to have different settings or even your own dashboards, please, contact us as we are looking for use cases to build the feature.\n\nDocumentation about our platform:\n\n- [Compute Resources](https://docs.nhost.io/platform/compute)\n- [Service Replicas](https://docs.nhost.io/platform/service-replicas)",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.2.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
@@ -124,7 +86,7 @@
|
||||
"content": "#### Pods\n\nEach service is comprised by at least one \"pod\" and, in the case of [replicas](https://docs.nhost.io/platform/service-replicas), you should see as many pods as replicas configured. Each pod is identified by the sevice name + some unique identifier, for instance, `\nhasura-auth-7995bfd767-mvthp`.\n\nPods can come and go for various reasons:\n\n1. When there is a configuration change. When this happens a new pod is created witht he new configuration. After the new pod is ready the old one is decommissioned. This means changes in configuration are hitless. The exception is postgres, when postgres configuration changes we need to bring it down cleanly before we start a new one so there is a short donwtime while this occurrs (1-2 min).\n2. When the process crashes due to an unexpected error. In this case the platform should detect the event and create a new pod immediately.\n3. When the process exceeds its allotted memory the pod is terminated and a new one is created.\n\n#### Throttling\n\nAs pro projects have shared CPUs services can throttle when they attempt to use more resources than they have available. Throttling metrics are hard to grasp but it is important to understand they can have a big impact on response times. Thottling happens in internvals of time (100ms) so it is important to look at both the throttling time and throttling % metrics. If the % is low throttling time might not be very impactful but the higher the percentage gets the higher the impact it can have.\n\nTo avoid throttling consider using [dedicated compute resources](https://docs.nhost.io/platform/compute#dedicated-compute)",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.2.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
@@ -143,7 +105,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "CPU utilization is calculated by calculating the average usage between two datapoints. At maximum granularity this is a 1 minute average, but when selecting longer periods of time granularity can decrease.\n\nGiven that the graph shows average usage it might be difficult to detect very sudden spikes.",
|
||||
"fieldConfig": {
|
||||
@@ -152,11 +114,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
@@ -165,6 +129,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -222,7 +187,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (irate(container_cpu_usage_seconds_total{container!~\"POD|\"}[$__rate_interval])) * 1000",
|
||||
@@ -238,7 +203,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -246,11 +211,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
@@ -259,6 +226,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -316,7 +284,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by (pod) (container_memory_usage_bytes{container!~\"POD|\"})",
|
||||
@@ -331,7 +299,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "When a service lacks resources the process is throttled until resources are available again.\n\nThis graph shows for how long pods are being throttled. This can incur in added latency to requests.",
|
||||
"fieldConfig": {
|
||||
@@ -340,11 +308,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
@@ -353,6 +323,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -411,7 +382,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (rate(container_cpu_cfs_throttled_seconds_total{container!~\"POD|\"}[$__rate_interval]))",
|
||||
@@ -428,7 +399,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "When a service lacks resources the process is throttled until resources are available again.\n\nThis graph shows how often the process is being throttled. As throttling happens in intervals of 100ms here you can see how many of those intervals required throttling.",
|
||||
"fieldConfig": {
|
||||
@@ -437,11 +408,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
@@ -450,6 +423,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -508,7 +482,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (rate(container_cpu_cfs_throttled_periods_total{container!~\"POD|\"}[$__rate_interval]))/sum by(pod) (rate(container_cpu_cfs_periods_total{container!~\"POD|\"}[$__rate_interval]))",
|
||||
@@ -525,7 +499,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -567,8 +541,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -603,7 +576,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (rate(container_network_transmit_bytes_total[$__rate_interval]))",
|
||||
@@ -615,7 +588,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "- sum by(pod) (rate(container_network_receive_bytes_total[$__rate_interval]))",
|
||||
@@ -632,7 +605,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This graph shows when a service was restarted. There are two main reasons why a service may be restarted:\n\n- OOMKilled - This means the service tried to use more memory than it has available and had to be restarted. For more information on resources you can check the [documentation](https://docs.nhost.io/platform/compute).\n- Error - This can show for mainly two reasons; when new configuration needs to be applied the service is terminated and due to limitations this shows as \"Error\" but it is, in fact, part of normal operations. This can also show if your service is misconfigured and/or can't start correctly for some reason. If this error doesn't show constantly it is safe to ignore this error.",
|
||||
"fieldConfig": {
|
||||
@@ -676,8 +649,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -712,13 +684,13 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(container, reason) (increase(pod_terminated_total[$__rate_interval]))",
|
||||
"hide": false,
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{container}}-{{reason}}",
|
||||
"legendFormat": "{{ print "{{container}}-{{reason}}" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -729,7 +701,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -771,8 +743,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -807,7 +778,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(ingress) (irate(nginx_ingress_controller_response_size_sum[$__rate_interval]))",
|
||||
@@ -819,7 +790,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(irate(fastly_prom_exporter_bytes_sent[$__rate_interval]))",
|
||||
@@ -836,7 +807,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -878,8 +849,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -913,7 +883,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "sum by(ingress) (irate(nginx_ingress_controller_requests[$__interval]))",
|
||||
@@ -925,7 +895,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "sum(irate(fastly_prom_exporter_requests_total[$__interval]))",
|
||||
@@ -955,7 +925,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "CPU utilization is calculated by calculating the average usage between two datapoints. At maximum granularity this is a 1 minute average, but when selecting longer periods of time granularity can decrease.\n\nGiven that the graph shows average usage it might be difficult to detect very sudden spikes.\n\nThe allotted line indicates how many CPU cycles are dedicated for the service. As free and pro projects have only shared CPU this line should show only a symbolic number. For projects with [dedicated compute resources](https://docs.nhost.io/platform/compute) this line should match the amount of resources configured.",
|
||||
"fieldConfig": {
|
||||
@@ -998,8 +968,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1033,24 +1002,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (irate(container_cpu_usage_seconds_total{container=\"postgres\"}[$__rate_interval])) * 1000",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_cpu_shares{container=\"postgres\"}) / 1.024",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1061,7 +1030,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This graph shows memory utilization for the service. The allotted line shows what's the amount of memory a service is allowed to consume. As resources are shared there is the possibility that the actual memory available is slightly lower. If a service exceeds the amount of memory it can use, it is restarted automatically.",
|
||||
"fieldConfig": {
|
||||
@@ -1104,8 +1073,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1140,24 +1108,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_memory_usage_bytes{container=\"postgres\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_memory_limit_bytes{container=\"postgres\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1168,7 +1136,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This shows the amount of data utilized by the postgres volume. This number may differ from the database size reported by postgres depending on the features configured. For instance, when archiving is enabled postgres needs to write on disk a lot of supporting files which might lead to big increase in disk usage.\n\nWhen postgres runs out of disk space it fails to start so it is important to ensure you don't fill the volume. If you need to increase your disk capacity don't hesitate to let us know.",
|
||||
"fieldConfig": {
|
||||
@@ -1211,8 +1179,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1247,7 +1214,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "kubelet_volume_stats_used_bytes{persistentvolumeclaim=\"postgres-pv-claim\"}",
|
||||
@@ -1258,7 +1225,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=\"postgres-pv-claim\"}",
|
||||
@@ -1274,7 +1241,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -1316,8 +1283,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1352,7 +1318,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container=\"postgres\"}[$__rate_interval]))",
|
||||
@@ -1364,7 +1330,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container=\"postgres\"}[$__rate_interval]))",
|
||||
@@ -1394,7 +1360,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "CPU utilization is calculated by calculating the average usage between two datapoints. At maximum granularity this is a 1 minute average, but when selecting longer periods of time granularity can decrease.\n\nGiven that the graph shows average usage it might be difficult to detect very sudden spikes.\n\nThe allotted line indicates how many CPU cycles are dedicated for the service. As free and pro projects have only shared CPU this line should show only a symbolic number. For projects with [dedicated compute resources](https://docs.nhost.io/platform/compute) this line should match the amount of resources configured.",
|
||||
"fieldConfig": {
|
||||
@@ -1437,8 +1403,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1472,24 +1437,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (irate(container_cpu_usage_seconds_total{container=\"hasura\"}[$__rate_interval])) * 1000",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_cpu_shares{container=\"hasura\"}) / 1.024",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1500,7 +1465,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This graph shows memory utilization for the service. The allotted line shows what's the amount of memory a service is allowed to consume. As resources are shared there is the possibility that the actual memory available is slightly lower. If a service exceeds the amount of memory it can use, it is restarted automatically.",
|
||||
"fieldConfig": {
|
||||
@@ -1543,8 +1508,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1579,24 +1543,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_memory_usage_bytes{container=\"hasura\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_memory_limit_bytes{container=\"hasura\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1620,7 +1584,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "CPU utilization is calculated by calculating the average usage between two datapoints. At maximum granularity this is a 1 minute average, but when selecting longer periods of time granularity can decrease.\n\nGiven that the graph shows average usage it might be difficult to detect very sudden spikes.\n\nThe allotted line indicates how many CPU cycles are dedicated for the service. As free and pro projects have only shared CPU this line should show only a symbolic number. For projects with [dedicated compute resources](https://docs.nhost.io/platform/compute) this line should match the amount of resources configured.",
|
||||
"fieldConfig": {
|
||||
@@ -1663,8 +1627,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1698,24 +1661,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (irate(container_cpu_usage_seconds_total{container=\"hasura-auth\"}[$__rate_interval])) * 1000",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_cpu_shares{container=\"hasura-auth\"}) / 1.024",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1726,7 +1689,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This graph shows memory utilization for the service. The allotted line shows what's the amount of memory a service is allowed to consume. As resources are shared there is the possibility that the actual memory available is slightly lower. If a service exceeds the amount of memory it can use, it is restarted automatically.",
|
||||
"fieldConfig": {
|
||||
@@ -1769,8 +1732,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1805,24 +1767,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_memory_usage_bytes{container=\"hasura-auth\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_memory_limit_bytes{container=\"hasura-auth\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1846,7 +1808,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "CPU utilization is calculated by calculating the average usage between two datapoints. At maximum granularity this is a 1 minute average, but when selecting longer periods of time granularity can decrease.\n\nGiven that the graph shows average usage it might be difficult to detect very sudden spikes.\n\nThe allotted line indicates how many CPU cycles are dedicated for the service. As free and pro projects have only shared CPU this line should show only a symbolic number. For projects with [dedicated compute resources](https://docs.nhost.io/platform/compute) this line should match the amount of resources configured.",
|
||||
"fieldConfig": {
|
||||
@@ -1889,8 +1851,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1924,24 +1885,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (irate(container_cpu_usage_seconds_total{container=\"hasura-storage\"}[$__rate_interval])) * 1000",
|
||||
"interval": "2m",
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_cpu_shares{container=\"hasura-storage\"}) / 1.024",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -1952,7 +1913,7 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"description": "This graph shows memory utilization for the service. The allotted line shows what's the amount of memory a service is allowed to consume. As resources are shared there is the possibility that the actual memory available is slightly lower. If a service exceeds the amount of memory it can use, it is restarted automatically.",
|
||||
"fieldConfig": {
|
||||
@@ -1995,8 +1956,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2031,24 +1991,24 @@
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_memory_usage_bytes{container=\"hasura-storage\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-used",
|
||||
"legendFormat": "{{ print "{{pod}}-used" }}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
"uid": "nhost"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum by(pod) (container_spec_memory_limit_bytes{container=\"hasura-storage\"})",
|
||||
"hide": false,
|
||||
"legendFormat": "{{pod}}-allotted",
|
||||
"legendFormat": "{{ print "{{pod}}-alloted" }}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
@@ -2057,31 +2017,12 @@
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"nhost"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "Prometheus",
|
||||
"value": "Prometheus"
|
||||
},
|
||||
"hide": 2,
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"name": "DS_PROMETHEUS",
|
||||
"options": [],
|
||||
"query": "prometheus",
|
||||
"refresh": 1,
|
||||
"regex": "Prometheus",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
}
|
||||
]
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
10
observability/grafana/dashboards_providers.yaml
Normal file
10
observability/grafana/dashboards_providers.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- disableDeletion: false
|
||||
editable: false
|
||||
folder: "Nhost - {{ .Subdomain }} ({{ .ProjectName }})"
|
||||
name: default
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/default
|
||||
orgId: 1
|
||||
type: file
|
||||
17
observability/grafana/datasources.yaml.tmpl
Normal file
17
observability/grafana/datasources.yaml.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- access: proxy
|
||||
isDefault: true
|
||||
name: Nhost
|
||||
type: prometheus
|
||||
url: http://amp-signer.nhost-services:8080
|
||||
uid: nhost
|
||||
jsonData:
|
||||
customQueryParameters: app_id=${APP_ID}
|
||||
httpHeaderName1: 'Authorization'
|
||||
manageAlerts: false
|
||||
cacheLevel: 'High'
|
||||
disableRecordingRules: true
|
||||
timeInterval: '60s'
|
||||
secureJsonData:
|
||||
httpHeaderValue1: 'Bearer ${TOKEN}'
|
||||
23
observability/grafana/grafana.ini
Normal file
23
observability/grafana/grafana.ini
Normal file
@@ -0,0 +1,23 @@
|
||||
[analytics]
|
||||
check_for_updates = false
|
||||
[grafana_net]
|
||||
url = https://grafana.net
|
||||
[log]
|
||||
mode = console
|
||||
[paths]
|
||||
data = /var/lib/grafana/
|
||||
logs = /var/log/grafana
|
||||
plugins = /var/lib/grafana/plugins
|
||||
provisioning = /var/lib/grafana/provisioning
|
||||
[server]
|
||||
domain = ''
|
||||
root_url = '{{ .RootURL }}'
|
||||
|
||||
{{ if .SMTP }}
|
||||
[smtp]
|
||||
enabled=true
|
||||
host={{ .SMTP.Host }}:{{ .SMTP.Port }}
|
||||
user={{ .SMTP.User }}
|
||||
password={{ .SMTP.Password }}
|
||||
from_address={{ .SMTP.Sender }}
|
||||
{{ end }}
|
||||
7
observability/grafana/notification_policies.yaml
Normal file
7
observability/grafana/notification_policies.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: 1
|
||||
policies:
|
||||
- orgId: 1
|
||||
receiver: Nhost Managed Contacts
|
||||
group_by:
|
||||
- grafana_folder
|
||||
- alertname
|
||||
369
observability/grafana/rules_nhost.yaml
Normal file
369
observability/grafana/rules_nhost.yaml
Normal file
@@ -0,0 +1,369 @@
|
||||
apiVersion: 1
|
||||
groups:
|
||||
- orgId: 1
|
||||
name: core
|
||||
folder: "Nhost - {{ .Subdomain }} ({{ .ProjectName }})"
|
||||
interval: 5m
|
||||
rules:
|
||||
- uid: nhosthighcpuusage
|
||||
title: High CPU usage
|
||||
condition: B
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: nhost
|
||||
model:
|
||||
editorMode: code
|
||||
expr: sum by(pod) (irate(container_cpu_usage_seconds_total{container!~"grafana|POD|"}[$__rate_interval])) / (sum by(pod) (container_spec_cpu_quota{container!~"grafana|POD|"}) / sum by(pod) (container_spec_cpu_period{container!~"POD|"})) * 100
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
- refId: B
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 75
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: B
|
||||
type: threshold
|
||||
noDataState: NoData
|
||||
execErrState: Error
|
||||
for: 5m
|
||||
annotations:
|
||||
runbook_url: https://docs.nhost.io/platform/compute-resources
|
||||
Project Subdomain: {{ .Subdomain }}
|
||||
Project Name: {{ .ProjectName }}
|
||||
description: |
|
||||
High CPU usage can be caused by a number of factors, including but not limited to:
|
||||
- High traffic
|
||||
- Inefficient code/queries
|
||||
- Inadequate resources
|
||||
|
||||
To resolve this issue, consider the following:
|
||||
- Optimize your code/queries
|
||||
- Increase the number of replicas
|
||||
- Increase the CPU resources allocated to your service
|
||||
|
||||
High CPU usage can lead to service instability, increased latency and downtime.
|
||||
|
||||
For more information, see the [Nhost documentation](https://docs.nhost.io/platform/compute-resources)
|
||||
summary: |
|
||||
The service replica {{ print "{{ index $labels \"pod\" }}" }} is experiencing, or has experienced, high CPU usage. Current usage is at {{ print "{{ index $values \"A\" }}" }}%.
|
||||
labels: {}
|
||||
isPaused: false
|
||||
|
||||
- uid: nhostlowdiskspace
|
||||
title: Low disk space
|
||||
condition: B
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: nhost
|
||||
model:
|
||||
editorMode: code
|
||||
expr: sum by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes) / sum by(persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes) * 100
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
- refId: B
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 75
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: B
|
||||
type: threshold
|
||||
noDataState: NoData
|
||||
execErrState: Error
|
||||
for: 5m
|
||||
annotations:
|
||||
runbook_url: https://docs.nhost.io/guides/database/configuring-postgres
|
||||
Subdomain: {{ .Subdomain }}
|
||||
Project Name: {{ .ProjectName }}
|
||||
description: |
|
||||
An increase in disk space usage can be caused by a number of factors, including but not limited to:
|
||||
- Large amounts of data
|
||||
- Changing in WAL settings
|
||||
|
||||
To resolve this issue, consider the following:
|
||||
- If you recently changed your WAL settings, consider reverting to the previous settings
|
||||
- Optimize your database tables
|
||||
- Remove data that is no longer needed
|
||||
- Increase the disk space allocated to your database
|
||||
|
||||
Running out of disk space can lead to service downtime and potential data loss.
|
||||
|
||||
For more information, see the [Nhost documentation](https://docs.nhost.io/guides/database/configuring-postgres)
|
||||
summary: |
|
||||
The persistent volume claim {{ print "{{ index $labels \"persistentvolumeclaim\" }}" }} current usage is at {{ print "{{ index $values \"A\" }}" }}%.
|
||||
labels: {}
|
||||
isPaused: false
|
||||
|
||||
- uid: nhostlowmemory
|
||||
title: Low free memory
|
||||
condition: B
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: nhost
|
||||
model:
|
||||
editorMode: code
|
||||
expr: sum by(pod) (container_memory_usage_bytes{container!~"grafana|"}) / sum by(pod) (container_spec_memory_limit_bytes{container!~"grafana|"}) * 100
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
- refId: B
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 75
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: B
|
||||
type: threshold
|
||||
noDataState: NoData
|
||||
execErrState: Error
|
||||
for: 5m
|
||||
annotations:
|
||||
runbook_url: https://docs.nhost.io/platform/compute-resources
|
||||
Subdomain: {{ .Subdomain }}
|
||||
Project Name: {{ .ProjectName }}
|
||||
description: |
|
||||
Low memory can be caused by a number of factors, including but not limited to:
|
||||
- High traffic
|
||||
- Inefficient code/queries
|
||||
- Inadequate resources
|
||||
|
||||
To resolve this issue, consider the following:
|
||||
- Optimize your code/queries
|
||||
- Increase the memory resources allocated to your service
|
||||
|
||||
Running out of memory can lead to service instability, increased latency and downtime.
|
||||
|
||||
For more information, see the [Nhost documentation](https://docs.nhost.io/platform/compute-resources)
|
||||
|
||||
summary: |
|
||||
The service replica {{ print "{{ index $labels \"pod\" }}" }} is experiencing, or has experienced, low memory. Current usage is at {{ print "{{ index $values \"A\" }}" }}%.
|
||||
labels: {}
|
||||
isPaused: false
|
||||
|
||||
- uid: nhostoom
|
||||
title: Service restarted due to lack of memory
|
||||
condition: B
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: nhost
|
||||
model:
|
||||
editorMode: code
|
||||
expr: sum by(pod) (increase(pod_terminated_total{reason="OOMKilled", pod!="grafana"}[$__rate_interval]))
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
- refId: B
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 0
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: B
|
||||
type: threshold
|
||||
noDataState: OK
|
||||
execErrState: Error
|
||||
for: 0s
|
||||
annotations:
|
||||
summary: |
|
||||
The service replica {{ print "{{ index $labels \"pod\" }}" }} has been restarted due to lack of memory.
|
||||
description: |
|
||||
When a service runs out of memory and is unable to allocate more, it is terminated by the
|
||||
OOM Killer. This is primarily caused by trying to allocate more memory than is permitted,
|
||||
which in turn can be caused by:
|
||||
|
||||
- High traffic
|
||||
- Inefficient code/queries
|
||||
- Inadequate resources
|
||||
|
||||
To resolve this issue, consider the following:
|
||||
- Optimize your code/queries
|
||||
- Increase the memory resources allocated to your service
|
||||
|
||||
This can lead to service instability, increased latency and downtime.
|
||||
|
||||
|
||||
For more information, see the [Nhost documentation](https://docs.nhost.io/platform/compute-resources)
|
||||
runbook_url: https://docs.nhost.io/platform/compute-resources
|
||||
Subdomain: {{ .Subdomain }}
|
||||
Project Name: {{ .ProjectName }}
|
||||
labels: {}
|
||||
isPaused: false
|
||||
|
||||
- uid: nhosthigherrorrate
|
||||
title: High request error rate
|
||||
condition: B
|
||||
data:
|
||||
- refId: A
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: nhost
|
||||
model:
|
||||
editorMode: code
|
||||
expr: sum by(ingress,method) (increase(nginx_ingress_controller_requests{ingress!="grafana",status=~"^[4-5].*"}[$__rate_interval])) / sum by(ingress, method) (increase(nginx_ingress_controller_requests[$__rate_interval])) * 100
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
maxDataPoints: 43200
|
||||
range: false
|
||||
refId: A
|
||||
- refId: B
|
||||
relativeTimeRange:
|
||||
from: 600
|
||||
to: 0
|
||||
datasourceUid: __expr__
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 25
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- C
|
||||
reducer:
|
||||
params: []
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: __expr__
|
||||
expression: A
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: B
|
||||
type: threshold
|
||||
noDataState: OK
|
||||
execErrState: Error
|
||||
for: 5m
|
||||
annotations:
|
||||
Subdomain: {{ .Subdomain }}
|
||||
Project Name: {{ .ProjectName }}
|
||||
summary: |
|
||||
The service {{ print "{{ index $labels \"ingress\" }}" }} is experiencing, or has experienced, a high error rate. Current error rate is at {{ print "{{ index $values \"A\" }}" }}%.
|
||||
description: |
|
||||
A high error rate can be caused by a number of factors, including but not limited to:
|
||||
- High traffic
|
||||
- Inefficient code/queries
|
||||
- Inadequate resources
|
||||
- Network issues
|
||||
- Code errors
|
||||
- Permission issues
|
||||
|
||||
To resolve this issue, consider the following:
|
||||
- Observe the service logs for more information
|
||||
|
||||
A high error rate means there is something fundamentally wrong with the service or your application. It can lead to service instability, increased latency and downtime.
|
||||
|
||||
For more information, see the [Nhost documentation](https://docs.nhost.io/platform/compute-resources)
|
||||
labels: {}
|
||||
isPaused: false
|
||||
11
observability/grafana/setup_config.sh
Normal file
11
observability/grafana/setup_config.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
set -euf
|
||||
|
||||
mkdir -p /var/lib/grafana/provisioning/datasources
|
||||
|
||||
TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
|
||||
APP_ID=$(sed "s/nhost-//g" /var/run/secrets/kubernetes.io/serviceaccount/namespace)
|
||||
|
||||
sed "s/\${TOKEN}/$TOKEN/g; s/\${APP_ID}/$APP_ID/g" \
|
||||
< /datasources.yaml.tmpl \
|
||||
> /var/lib/grafana/provisioning/datasources/datasources.yaml
|
||||
@@ -83,7 +83,7 @@
|
||||
"turbo": "1.11.3",
|
||||
"typedoc": "^0.22.18",
|
||||
"typescript": "4.9.5",
|
||||
"vite": "^5.2.13",
|
||||
"vite": "^5.4.6",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"vitest": "^0.32.4"
|
||||
@@ -154,7 +154,10 @@
|
||||
"nth-check": "^2.0.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"@graphiql/react": "^0.22.3"
|
||||
"@graphiql/react": "^0.22.3",
|
||||
"send": "^0.19.0",
|
||||
"dset": "^3.1.4",
|
||||
"rollup": "^4.22.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/hasura-auth-js
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 55d8bb5: feat: support custom headers in sign-up and deanonymize requests
|
||||
|
||||
## 2.5.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-auth-js",
|
||||
"version": "2.5.6",
|
||||
"version": "2.6.0",
|
||||
"description": "Hasura-auth client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
NhostSession,
|
||||
PasswordlessOptions,
|
||||
RequestOptions,
|
||||
SignUpOptions,
|
||||
SignUpSecurityKeyOptions
|
||||
} from '../../types'
|
||||
@@ -23,7 +24,13 @@ export type AuthEvents =
|
||||
options?: PasswordlessOptions
|
||||
}
|
||||
| { type: 'PASSWORDLESS_SMS_OTP'; phoneNumber?: string; otp?: string }
|
||||
| { type: 'SIGNUP_EMAIL_PASSWORD'; email?: string; password?: string; options?: SignUpOptions }
|
||||
| {
|
||||
type: 'SIGNUP_EMAIL_PASSWORD'
|
||||
email?: string
|
||||
password?: string
|
||||
options?: SignUpOptions
|
||||
requestOptions?: RequestOptions
|
||||
}
|
||||
| { type: 'SIGNUP_SECURITY_KEY'; email?: string; options?: SignUpSecurityKeyOptions }
|
||||
| { type: 'SIGNOUT'; all?: boolean }
|
||||
| { type: 'SIGNIN_MFA_TOTP'; ticket?: string; otp?: string }
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
PasswordlessSmsOtpResponse,
|
||||
PasswordlessSmsResponse,
|
||||
RefreshSessionResponse,
|
||||
RequestOptions,
|
||||
SignInAnonymousResponse,
|
||||
SignInMfaTotpResponse,
|
||||
SignInPATResponse,
|
||||
@@ -92,9 +93,10 @@ export const createAuthMachine = ({
|
||||
const postRequest = async <T = any, D = any>(
|
||||
url: string,
|
||||
data?: D,
|
||||
token?: string | null
|
||||
token?: string | null,
|
||||
headers?: Record<string, string>
|
||||
): Promise<T> => {
|
||||
const result = await postFetch<T>(`${backendUrl}${url}`, data, token)
|
||||
const result = await postFetch<T>(`${backendUrl}${url}`, data, token, headers)
|
||||
|
||||
return result.data
|
||||
}
|
||||
@@ -910,13 +912,14 @@ export const createAuthMachine = ({
|
||||
|
||||
return signOutResponse
|
||||
},
|
||||
signUpEmailPassword: async (context, { email, password, options }) => {
|
||||
signUpEmailPassword: async (context, { email, password, options, requestOptions }) => {
|
||||
if (!isValidEmail(email)) {
|
||||
return Promise.reject<SignUpResponse>({ error: INVALID_EMAIL_ERROR })
|
||||
}
|
||||
if (!isValidPassword(password)) {
|
||||
return Promise.reject<SignUpResponse>({ error: INVALID_PASSWORD_ERROR })
|
||||
}
|
||||
|
||||
if (context.user?.isAnonymous) {
|
||||
return postRequest<SignUpResponse>(
|
||||
'/user/deanonymize',
|
||||
@@ -926,14 +929,20 @@ export const createAuthMachine = ({
|
||||
password,
|
||||
options: rewriteRedirectTo(clientUrl, options)
|
||||
},
|
||||
context.accessToken.value
|
||||
context.accessToken.value,
|
||||
requestOptions?.headers
|
||||
)
|
||||
} else {
|
||||
return postRequest<SignUpResponse>('/signup/email-password', {
|
||||
email,
|
||||
password,
|
||||
options: rewriteRedirectTo(clientUrl, options)
|
||||
})
|
||||
return postRequest<SignUpResponse>(
|
||||
'/signup/email-password',
|
||||
{
|
||||
email,
|
||||
password,
|
||||
options: rewriteRedirectTo(clientUrl, options)
|
||||
},
|
||||
null,
|
||||
requestOptions?.headers
|
||||
)
|
||||
}
|
||||
},
|
||||
signUpSecurityKey: async (_, { email, options }) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { USER_ALREADY_SIGNED_IN } from '../errors'
|
||||
import { AuthInterpreter } from '../machines'
|
||||
import { SignUpOptions } from '../types'
|
||||
import { RequestOptions, SignUpOptions } from '../types'
|
||||
|
||||
import {
|
||||
AuthActionLoadingState,
|
||||
@@ -20,13 +20,15 @@ export const signUpEmailPasswordPromise = (
|
||||
interpreter: AuthInterpreter,
|
||||
email: string,
|
||||
password: string,
|
||||
options?: SignUpOptions
|
||||
options?: SignUpOptions,
|
||||
requestOptions?: RequestOptions
|
||||
): Promise<SignUpEmailPasswordHandlerResult> =>
|
||||
new Promise<SignUpEmailPasswordHandlerResult>((resolve) => {
|
||||
const { changed, context } = interpreter.send('SIGNUP_EMAIL_PASSWORD', {
|
||||
email,
|
||||
password,
|
||||
options
|
||||
options,
|
||||
requestOptions
|
||||
})
|
||||
if (!changed) {
|
||||
return resolve({
|
||||
|
||||
@@ -57,3 +57,8 @@ export interface WorkOsOptions extends CommonProviderOptions {
|
||||
provider?: string
|
||||
}
|
||||
export interface ProviderOptions extends CommonProviderOptions, WorkOsOptions {}
|
||||
|
||||
export interface RequestOptions {
|
||||
// optional extra headers to be sent with request (ex: x-cf-turnstile-response)
|
||||
headers?: Record<string, string>
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@ if (typeof EdgeRuntime !== 'string') {
|
||||
const fetchWrapper = async <T>(
|
||||
url: string,
|
||||
method: 'GET' | 'POST',
|
||||
{ token, body }: { token?: string | null; body?: any } = {}
|
||||
{
|
||||
token,
|
||||
body,
|
||||
extraHeaders
|
||||
}: { token?: string | null; body?: any; extraHeaders?: HeadersInit } = {}
|
||||
): Promise<FetcResponse<T>> => {
|
||||
const headers: HeadersInit = {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -26,9 +30,12 @@ const fetchWrapper = async <T>(
|
||||
if (token) {
|
||||
headers['Authorization'] = `Bearer ${token}`
|
||||
}
|
||||
|
||||
const mergedHeaders = { ...headers, ...extraHeaders }
|
||||
|
||||
const options: RequestInit = {
|
||||
method,
|
||||
headers
|
||||
headers: mergedHeaders
|
||||
}
|
||||
if (body) {
|
||||
options.body = JSON.stringify(body)
|
||||
@@ -59,8 +66,9 @@ const fetchWrapper = async <T>(
|
||||
export const postFetch = async <T>(
|
||||
url: string,
|
||||
body: any,
|
||||
token?: string | null
|
||||
): Promise<FetcResponse<T>> => fetchWrapper<T>(url, 'POST', { token, body })
|
||||
token?: string | null,
|
||||
extraHeaders?: HeadersInit
|
||||
): Promise<FetcResponse<T>> => fetchWrapper<T>(url, 'POST', { token, body, extraHeaders })
|
||||
|
||||
export const getFetch = <T>(url: string, token?: string | null): Promise<FetcResponse<T>> =>
|
||||
fetchWrapper<T>(url, 'GET', { token })
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 2.1.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/react@3.6.0
|
||||
|
||||
## 2.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52a38fe: chore: update dependencies to address security vulnerabilities
|
||||
|
||||
## 2.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "2.1.20",
|
||||
"version": "2.1.22",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -78,7 +78,7 @@
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"next": "^14.1.4",
|
||||
"next": "^14.2.10",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 3.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [55d8bb5]
|
||||
- @nhost/hasura-auth-js@2.6.0
|
||||
|
||||
## 3.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "3.1.9",
|
||||
"version": "3.1.10",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost/react
|
||||
|
||||
## 3.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 55d8bb5: feat: add `requestOptions` to `signUpEmailPassword` to allow passing extra headers with the signup request
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 3.5.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "3.5.6",
|
||||
"version": "3.6.0",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import {
|
||||
signUpEmailPasswordPromise,
|
||||
SignUpEmailPasswordState,
|
||||
SignUpOptions
|
||||
SignUpOptions,
|
||||
RequestOptions
|
||||
} from '@nhost/nhost-js'
|
||||
import { useSelector } from '@xstate/react'
|
||||
import { useAuthInterpreter } from './useAuthInterpreter'
|
||||
@@ -12,7 +13,8 @@ interface SignUpEmailPasswordHandler {
|
||||
(
|
||||
email: string,
|
||||
password: string,
|
||||
options?: SignUpOptions
|
||||
options?: SignUpOptions,
|
||||
requestOptions?: RequestOptions
|
||||
): Promise<SignUpEmailPasswordHandlerResult>
|
||||
}
|
||||
|
||||
@@ -69,8 +71,9 @@ export const useSignUpEmailPassword: SignUpEmailPasswordHook = (options) => {
|
||||
const signUpEmailPassword: SignUpEmailPasswordHandler = (
|
||||
email,
|
||||
password,
|
||||
valueOptions = options
|
||||
) => signUpEmailPasswordPromise(service, email, password as string, valueOptions)
|
||||
valueOptions = options,
|
||||
requestOptions
|
||||
) => signUpEmailPasswordPromise(service, email, password as string, valueOptions, requestOptions)
|
||||
|
||||
const user = useSelector(
|
||||
service,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 2.6.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.10
|
||||
|
||||
## 2.6.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "2.6.6",
|
||||
"version": "2.6.7",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
1718
pnpm-lock.yaml
generated
1718
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user