update at 2024-04-23 16:48:27

pull/158/head
roc 2024-04-23 16:48:27 +08:00
parent 2c1de6daf8
commit 955f8674eb
7 changed files with 67 additions and 47 deletions

View File

@ -53,53 +53,6 @@ const sidebars: SidebarsConfig = {
}, },
], ],
}, },
{
type: 'category',
label: '监控告警',
collapsed: false,
link: {
type: 'generated-index',
slug: '/monitoring'
},
items: [
{
type: 'category',
label: 'Prometheus',
collapsed: true,
link: {
type: 'generated-index',
slug: '/monitoring/prometheus'
},
items: [
'monitoring/prometheus/annotation-discovery',
],
},
{
type: 'category',
label: 'Grafana',
collapsed: true,
link: {
type: 'generated-index',
slug: '/monitoring/grafana'
},
items: [
'monitoring/grafana/ha-setup',
],
},
{
type: 'category',
label: 'Victoria Metrics',
collapsed: true,
link: {
type: 'generated-index',
slug: '/monitoring/victoriametrics'
},
items: [
'monitoring/victoriametrics/install-with-operator',
],
}
],
},
{ {
type: 'category', type: 'category',
label: '高效使用 kubectl', label: '高效使用 kubectl',

View File

@ -0,0 +1,3 @@
# Kubernetes 监控告警
分享一些 Kubernetes 监控告警相关实践。

View File

@ -0,0 +1,45 @@
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
appendixSidebar: [
'README',
{
type: 'category',
label: 'Prometheus',
collapsed: false,
link: {
type: 'generated-index',
slug: '/prometheus'
},
items: [
'prometheus/annotation-discovery',
],
},
{
type: 'category',
label: 'Grafana',
collapsed: false,
link: {
type: 'generated-index',
slug: '/grafana'
},
items: [
'grafana/ha',
],
},
{
type: 'category',
label: 'Victoria Metrics',
collapsed: false,
link: {
type: 'generated-index',
slug: '/victoriametrics'
},
items: [
'victoriametrics/install-with-operator',
],
}
],
};
export default sidebars;

View File

@ -67,6 +67,21 @@ const config: Config = {
`https://github.com/imroc/kubernetes-guide/edit/main/content/basics/${docPath}`, `https://github.com/imroc/kubernetes-guide/edit/main/content/basics/${docPath}`,
}), }),
], ],
[
/** @type {import('@docusaurus/plugin-content-docs').PluginOptions} */
'@docusaurus/plugin-content-docs',
({
id: 'monitornig',
path: 'content/monitoring',
// 文档的路由前缀
routeBasePath: '/monitoring',
// 左侧导航栏的配置
sidebarPath: require.resolve('./content/monitoring/sidebars.ts'),
// 每个文档左下角 "编辑此页" 的链接
editUrl: ({ docPath }) =>
`https://github.com/imroc/kubernetes-guide/edit/main/content/monitoring/${docPath}`,
}),
],
[ [
/** @type {import('@docusaurus/plugin-content-docs').PluginOptions} */ /** @type {import('@docusaurus/plugin-content-docs').PluginOptions} */
'@docusaurus/plugin-content-docs', '@docusaurus/plugin-content-docs',
@ -156,6 +171,10 @@ const config: Config = {
label: '基础实践', label: '基础实践',
position: 'right', position: 'right',
to: '/basics', to: '/basics',
}{
label: '监控告警',
position: 'right',
to: '/monitoring',
}, },
{ {
label: '最佳实践', label: '最佳实践',