mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
updates
This commit is contained in:
12
readme.md
12
readme.md
@@ -44,10 +44,18 @@ The hub and agent are distributed as single binary files, as well as docker imag
|
|||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
|
## Hub
|
||||||
|
|
||||||
| Name | Default | Description |
|
| Name | Default | Description |
|
||||||
| ----------------------- | ------- | ------------------------------------------------ |
|
| ----------------------- | ------- | -------------------------------- |
|
||||||
| `DISABLE_PASSWORD_AUTH` | false | Disables password authentication |
|
| `DISABLE_PASSWORD_AUTH` | false | Disables password authentication |
|
||||||
|
|
||||||
|
## Agent
|
||||||
|
|
||||||
|
| Name | Default | Description |
|
||||||
|
| ------------ | ------- | ------------------------------------------------ |
|
||||||
| `FILESYSTEM` | unset | Filesystem / partition to use for disk I/O stats |
|
| `FILESYSTEM` | unset | Filesystem / partition to use for disk I/O stats |
|
||||||
|
| `PORT` | 45876 | Port to listen on |
|
||||||
|
|
||||||
## OAuth / OIDC setup
|
## OAuth / OIDC setup
|
||||||
|
|
||||||
@@ -113,8 +121,6 @@ If it's not set, the agent will try to find the filesystem mounted on `/` and us
|
|||||||
- Run `lsblk` and choose an option under "NAME"
|
- Run `lsblk` and choose an option under "NAME"
|
||||||
- Run `sudo fdisk -l` and choose an option under "Device"
|
- Run `sudo fdisk -l` and choose an option under "Device"
|
||||||
|
|
||||||
> Note: the first reading always comes in as 0 bytes because it needs to establish baseline values.
|
|
||||||
|
|
||||||
### Month / week records are not populating reliably
|
### Month / week records are not populating reliably
|
||||||
|
|
||||||
Records for longer time periods are made by averaging stats from the shorter time periods. They require the agent to be running uninterrupted for long enough to get a full set of data.
|
Records for longer time periods are made by averaging stats from the shorter time periods. They require the agent to be running uninterrupted for long enough to get a full set of data.
|
||||||
|
@@ -16,7 +16,7 @@ const chartConfig = {
|
|||||||
},
|
},
|
||||||
sent: {
|
sent: {
|
||||||
label: 'Sent',
|
label: 'Sent',
|
||||||
color: 'hsl(var(--chart-1))',
|
color: 'hsl(var(--chart-5))',
|
||||||
},
|
},
|
||||||
} satisfies ChartConfig
|
} satisfies ChartConfig
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ import Spinner from '../spinner'
|
|||||||
const chartConfig = {
|
const chartConfig = {
|
||||||
read: {
|
read: {
|
||||||
label: 'Read',
|
label: 'Read',
|
||||||
color: 'hsl(var(--chart-5))',
|
color: 'hsl(var(--chart-1))',
|
||||||
},
|
},
|
||||||
write: {
|
write: {
|
||||||
label: 'Write',
|
label: 'Write',
|
||||||
@@ -78,13 +78,6 @@ export default function DiskIoChart({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Area
|
|
||||||
dataKey="read"
|
|
||||||
type="monotoneX"
|
|
||||||
fill="var(--color-read)"
|
|
||||||
fillOpacity={0.4}
|
|
||||||
stroke="var(--color-read)"
|
|
||||||
/>
|
|
||||||
<Area
|
<Area
|
||||||
dataKey="write"
|
dataKey="write"
|
||||||
type="monotoneX"
|
type="monotoneX"
|
||||||
@@ -92,6 +85,13 @@ export default function DiskIoChart({
|
|||||||
fillOpacity={0.4}
|
fillOpacity={0.4}
|
||||||
stroke="var(--color-write)"
|
stroke="var(--color-write)"
|
||||||
/>
|
/>
|
||||||
|
<Area
|
||||||
|
dataKey="read"
|
||||||
|
type="monotoneX"
|
||||||
|
fill="var(--color-read)"
|
||||||
|
fillOpacity={0.4}
|
||||||
|
stroke="var(--color-read)"
|
||||||
|
/>
|
||||||
</AreaChart>
|
</AreaChart>
|
||||||
</ChartContainer>
|
</ChartContainer>
|
||||||
)
|
)
|
||||||
|
@@ -19,11 +19,6 @@ const DiskChart = lazy(() => import('../charts/disk-chart'))
|
|||||||
const DiskIoChart = lazy(() => import('../charts/disk-io-chart'))
|
const DiskIoChart = lazy(() => import('../charts/disk-io-chart'))
|
||||||
const BandwidthChart = lazy(() => import('../charts/bandwidth-chart'))
|
const BandwidthChart = lazy(() => import('../charts/bandwidth-chart'))
|
||||||
|
|
||||||
function timestampToBrowserTime(timestamp: string) {
|
|
||||||
const date = new Date(timestamp)
|
|
||||||
return date.toLocaleString()
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ServerDetail({ name }: { name: string }) {
|
export default function ServerDetail({ name }: { name: string }) {
|
||||||
const servers = useStore($systems)
|
const servers = useStore($systems)
|
||||||
const updatedSystem = useStore($updatedSystem)
|
const updatedSystem = useStore($updatedSystem)
|
||||||
@@ -254,6 +249,7 @@ export default function ServerDetail({ name }: { name: string }) {
|
|||||||
<ContainerCpuChart chartData={dockerCpuChartData} ticks={ticks} />
|
<ContainerCpuChart chartData={dockerCpuChartData} ticks={ticks} />
|
||||||
</ChartCard>
|
</ChartCard>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ChartCard title="Total Memory Usage" description="Precise utilization at the recorded time">
|
<ChartCard title="Total Memory Usage" description="Precise utilization at the recorded time">
|
||||||
<MemChart chartData={memChartData} ticks={ticks} />
|
<MemChart chartData={memChartData} ticks={ticks} />
|
||||||
</ChartCard>
|
</ChartCard>
|
||||||
@@ -263,12 +259,14 @@ export default function ServerDetail({ name }: { name: string }) {
|
|||||||
<ContainerMemChart chartData={dockerMemChartData} ticks={ticks} />
|
<ContainerMemChart chartData={dockerMemChartData} ticks={ticks} />
|
||||||
</ChartCard>
|
</ChartCard>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ChartCard
|
<ChartCard
|
||||||
title="Disk Usage"
|
title="Disk Usage"
|
||||||
description="Usage of partition where the root filesystem is mounted"
|
description="Usage of partition where the root filesystem is mounted"
|
||||||
>
|
>
|
||||||
<DiskChart chartData={diskChartData} ticks={ticks} />
|
<DiskChart chartData={diskChartData} ticks={ticks} />
|
||||||
</ChartCard>
|
</ChartCard>
|
||||||
|
|
||||||
<ChartCard
|
<ChartCard
|
||||||
title="Disk I/O"
|
title="Disk I/O"
|
||||||
description="Throughput of disk where the root filesystem is mounted"
|
description="Throughput of disk where the root filesystem is mounted"
|
||||||
@@ -279,18 +277,6 @@ export default function ServerDetail({ name }: { name: string }) {
|
|||||||
<ChartCard title="Bandwidth" description="Throughput of network interfaces">
|
<ChartCard title="Bandwidth" description="Throughput of network interfaces">
|
||||||
<BandwidthChart chartData={bandwidthChartData} ticks={ticks} />
|
<BandwidthChart chartData={bandwidthChartData} ticks={ticks} />
|
||||||
</ChartCard>
|
</ChartCard>
|
||||||
|
|
||||||
<Card>
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className={'mb-3'}>{server.name}</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
{server.ip} - last updated: {timestampToBrowserTime(server.updated)}
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<pre>{JSON.stringify(server, null, 2)}</pre>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -73,7 +73,7 @@ function CellFormatter(info: CellContext<SystemRecord, unknown>) {
|
|||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
'absolute inset-0 w-full h-full origin-left',
|
'absolute inset-0 w-full h-full origin-left',
|
||||||
(val < 50 && 'bg-green-500') || (val < 80 && 'bg-yellow-500') || 'bg-red-500'
|
(val < 50 && 'bg-green-500') || (val < 80 && 'bg-yellow-500') || 'bg-red-600'
|
||||||
)}
|
)}
|
||||||
style={{ transform: `scalex(${val}%)` }}
|
style={{ transform: `scalex(${val}%)` }}
|
||||||
></span>
|
></span>
|
||||||
|
Reference in New Issue
Block a user