Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
run: |
make build

- name: run test
run: |
make test

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
3 changes: 0 additions & 3 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export default defineConfig({

srcDir: 'src',

// Can be removed as soon as the legacy content is removed
srcExclude: ['**/legacy/**'],

vite: {
server: {
fs: {
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ DOCKERRUN=docker run \
-v $(PWD)/package.json:/opt/node_app/package.json \
naemon/docs:latest

.PHONY: test

build: node_modules
npm run docs:build

Expand All @@ -32,10 +34,19 @@ docker-server:

clean:
rm -rf node_modules
rm -rf .vitepress/dist/
rm -rf .vitepress/cache/
rm -rf package-lock.json
rm -rf src/documentation/developer/externalcommands/commands.c.cache
rm -rf src/public/news/feed.xml

update_livestatus_json:
docker run --rm -ti \
consol/omd-labs-rocky:nightly \
bash -c "omd start >/dev/null; sudo su - demo -c \"echo -e 'GET columns\nColumns: table name description type\nOutputFormat: json\n' | lq\"" \
> src/documentation/usersguide/livestatus.columns.json
fromdos src/documentation/usersguide/livestatus.columns.json

test:
$(MAKE) build
npm run test
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"@types/node": "^22.12.0",
"feed": "^4.2.2",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.5.0"
"vitepress": "^1.5.0",
"vitest": "^3.1.4"
},
"scripts": {
"docs:dev": "npx vitepress dev --host",
"docs:build": "npx vitepress build",
"docs:preview": "npx vitepress preview"
"docs:preview": "npx vitepress preview",
"test": "vitest run"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.7.0"
Expand Down
28 changes: 15 additions & 13 deletions src/documentation/usersguide/objectdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ A host definition is used to define a physical server, workstation, device, etc.
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define host {
host_name host_name // [!code error]
alias alias // [!code error]
Expand Down Expand Up @@ -421,7 +421,7 @@ Valid options are a combination of one or more of the following:
- `o` = UP states
- `d` = DOWN states
- `u` = UNREACHABLE states
-
-
</td>
</tr>

Expand Down Expand Up @@ -687,7 +687,7 @@ configuration with [object tricks](objecttricks) or display purposes in the [CGI
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define hostgroup {
hostgroup_name hostgroup_name // [!code error]
alias alias // [!code error]
Expand Down Expand Up @@ -812,7 +812,7 @@ The different arguments to a service definition are outlined below.
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define service {
host_name host_name // [!code error]
hostgroup_name hostgroup_name
Expand Down Expand Up @@ -1081,6 +1081,7 @@ If you set this directive to a value of `0`, Naemon will determine a freshness t

</td>
</tr>
<tr>
<td valign="top"><strong>event_handler</strong>:</td>
<td>

Expand All @@ -1092,6 +1093,7 @@ Read the documentation on
The maximum amount of time that the event handler command can run is controlled by the [event_handler_timeout](configmain#event_handler_timeout) option.

</td>
</tr>
<tr>
<td valign="top"><strong>event_handler_enabled <a href="#retention_notes" class="text-red">*</a></strong>:</td>
<td>
Expand Down Expand Up @@ -1367,7 +1369,7 @@ configuration with [object tricks](objecttricks) or display purposes in the [CGI
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define servicegroup {
servicegroup_name servicegroup_name // [!code error]
alias alias // [!code error]
Expand Down Expand Up @@ -1496,7 +1498,7 @@ The different arguments to a contact definition are described below.
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define contact {
contact_name contact_name // [!code error]
alias alias
Expand Down Expand Up @@ -1784,7 +1786,7 @@ together for the purpose of sending out alert/recovery <a href="notifications.ht
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define contactgroup {
contactgroup_name contactgroup_name // [!code error]
alias alias // [!code error]
Expand Down Expand Up @@ -1867,7 +1869,7 @@ including: specific weekdays, days of generic months, days of specific months, a
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define timeperiod {
timeperiod_name timeperiod_name // [!code error]
alias alias // [!code error]
Expand Down Expand Up @@ -2021,7 +2023,7 @@ found [here](macros). The different arguments to a command definition are outlin
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define command {
command_name command_name // [!code error]
command_line command_line // [!code error]
Expand Down Expand Up @@ -2101,7 +2103,7 @@ found [here](dependencies).
> [!TIP]Directives in red are required, while those in black are optional.
> However, you must supply at least one type of criteria for the definition to be of much use.

```
```js
define servicedependency {
dependent_host_name host_name // [!code error]
dependent_hostgroup_name hostgroup_name
Expand Down Expand Up @@ -2294,7 +2296,7 @@ More information on how notification escalations work can be found <a href="esca
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define serviceescalation {
host_name host_name // [!code error]
hostgroup_name hostgroup_name
Expand Down Expand Up @@ -2473,7 +2475,7 @@ More information on how host dependencies work (read this!) can be found
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define hostdependency {
dependent_host_name host_name // [!code error]
dependent_hostgroup_name hostgroup_name
Expand Down Expand Up @@ -2622,7 +2624,7 @@ More information on how notification escalations work can be found [here](escala
> [!IMPORTANT]
> Directives in red are required, while those in black are optional.

```
```js
define hostescalation {
host_name host_name // [!code error]
hostgroup_name hostgroup_name
Expand Down
Loading