Skip to content

Commit bcedc0e

Browse files
Sea-nJellyfrog
andauthored
Improve Markdown syntax in Document (librenms#12949)
* Use GitLab instead of Gitlab Only change text part, the Alert.Transport.Gitlab class left as is. * Fix href in document * Move section in document The agent list in this document is sorted by alphabetical order, "SDFS info" is the only exception. * Remove trailing spaces in document * Align code in document * Fix Markdown in document - Escape underline - Add syntax highlight - Add two space in the end of line to make it a newline - Add newline before list or code section * Update LibreNMS/Alert/Transport/Gitlab.php Co-authored-by: Jellyfrog <[email protected]>
1 parent 7edc302 commit bcedc0e

39 files changed

+281
-264
lines changed

LibreNMS/Alert/Transport/Gitlab.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* along with this program. If not, see <https://www.gnu.org/licenses/>. */
1515

1616
/**
17-
* Gitlab API Transport
17+
* GitLab API Transport
1818
* @author Drew Hynes <[email protected]>
1919
* @copyright 2018 Drew Hynes, LibreNMS
2020
* @license GPL
@@ -74,11 +74,11 @@ public function contactGitlab($obj, $opts)
7474
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
7575
if ($code == 200) {
7676
$gitlabout = json_decode($ret, true);
77-
d_echo('Created Gitlab issue ' . $gitlabout['key'] . ' for ' . $device);
77+
d_echo('Created GitLab issue ' . $gitlabout['key'] . ' for ' . $device);
7878

7979
return true;
8080
} else {
81-
d_echo('Gitlab connection error: ' . serialize($ret));
81+
d_echo('GitLab connection error: ' . serialize($ret));
8282

8383
return false;
8484
}
@@ -92,13 +92,13 @@ public static function configTemplate()
9292
[
9393
'title' => 'Host',
9494
'name' => 'gitlab-host',
95-
'descr' => 'Gitlab Host',
95+
'descr' => 'GitLab Host',
9696
'type' => 'text',
9797
],
9898
[
9999
'title' => 'Project ID',
100100
'name' => 'gitlab-id',
101-
'descr' => 'Gitlab Prokect ID',
101+
'descr' => 'GitLab Project ID',
102102
'type'=> 'text',
103103
],
104104
[

doc/API/Devices.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ search all oxidized device configs for a string.
13101310
Route: `api/v0/oxidized/config/search/:searchstring`
13111311

13121312
- searchstring is the specific string you would like to search for.
1313-
1313+
13141314
Input:
13151315

13161316
-
@@ -1345,7 +1345,7 @@ Returns a specific device's config from oxidized.
13451345
Route: `api/v0/oxidized/config/:device_name`
13461346

13471347
- device_name is the full dns name of the device used when adding the device to librenms.
1348-
1348+
13491349
Input:
13501350

13511351
-

doc/API/Inventory.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cage, then the sfp itself. The way this API call is designed is to
1111
enable a recursive lookup. The first call will retrieve the root
1212
entry, included within this response will be entPhysicalIndex, you can
1313
then call for entPhysicalContainedIn which will then return the next
14-
layer of results. To retrieve all items together, see
14+
layer of results. To retrieve all items together, see
1515
[get_inventory_for_device](#get_inventory_for_device).
1616

1717
Route: `/api/v0/inventory/:hostname`
@@ -69,8 +69,8 @@ Output:
6969

7070
### `get_inventory_for_device`
7171

72-
Retrieve the flattened inventory for a device. This retrieves all
73-
inventory items for a device regardless of their structure, and may be
72+
Retrieve the flattened inventory for a device. This retrieves all
73+
inventory items for a device regardless of their structure, and may be
7474
more useful for devices with with nested components.
7575

7676
Route: `/api/v0/inventory/:hostname/all`
@@ -114,4 +114,4 @@ Output:
114114
}
115115
]
116116
}
117-
```
117+
```

doc/Alerting/Transports.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ The index pattern uses strftime() formatting.
261261
| Port | 9200 |
262262
| Index Patter | librenms-%Y.%m.%d |
263263

264-
## Gitlab
264+
## GitLab
265265

266266
LibreNMS will create issues for warning and critical level alerts
267267
however only title and description are set. Uses Personal access
268-
tokens to authenticate with Gitlab and will store the token in cleartext.
268+
tokens to authenticate with GitLab and will store the token in cleartext.
269269

270270
**Example:**
271271

@@ -359,9 +359,9 @@ As a small reminder, here is it's configuration directives including defaults:
359359
## Matrix
360360

361361
For using the Matrix transports, you have to create a room on the Matrix-server.
362-
The provided Auth_token belongs to an user, which is member of this room.
362+
The provided Auth_token belongs to an user, which is member of this room.
363363
The Message, sent to the matrix-room can be built from the variables defined in
364-
[Template-Syntax](Templates.md#syntax) but without the 'alert->' prefix.
364+
[Template-Syntax](Templates.md#syntax) but without the 'alert->' prefix.
365365
See API-Transport. The variable ``` $msg ``` is contains the result of the Alert template.
366366
The Matrix-Server URL is cutted before the beginning of the ``_matrix/client/r0/...`` API-part.
367367

@@ -376,9 +376,9 @@ The Matrix-Server URL is cutted before the beginning of the ``_matrix/client/r0/
376376

377377
## Microsoft Teams
378378

379-
LibreNMS can send alerts to Microsoft Teams [Incoming Webhooks](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) which are
380-
then posted to a specific channel. Microsoft recommends using
381-
[markdown](https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format#markdown-formatting-for-connector-cards) formatting for connector cards.
379+
LibreNMS can send alerts to Microsoft Teams [Incoming Webhooks](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) which are
380+
then posted to a specific channel. Microsoft recommends using
381+
[markdown](https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format#markdown-formatting-for-connector-cards) formatting for connector cards.
382382
Administrators can opt to [compose](https://messagecardplayground.azurewebsites.net/)
383383
the [MessageCard](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference)
384384
themselves using JSON to get the full functionality.
@@ -658,7 +658,10 @@ You need a token you can find on your personnal space.
658658
LibreNMS can send alerts to a Splunk instance and provide all device
659659
and alert details.
660660

661-
Example output: `Feb 21 15:21:52 nms hostname="localhost", sysName="localhost",
661+
Example output:
662+
663+
```
664+
Feb 21 15:21:52 nms hostname="localhost", sysName="localhost",
662665
sysDescr="", sysContact="", os="fortigate", type="firewall", ip="localhost",
663666
hardware="FGT_50E", version="v5.6.9", serial="", features="", location="",
664667
uptime="387", uptime_short=" 6m 27s", uptime_long=" 6 minutes 27 seconds",

doc/Developing/Creating-Documentation.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source: Developing/Creating-Documentation.md
1+
source: Developing/Creating-Documentation.md
22
path: blob/master/doc/
33

44
# Creating Documentation
@@ -63,13 +63,13 @@ This means you can use:
6363

6464
## Building docs
6565

66-
This is achieved with `mkdocs`, a python package.
66+
This is achieved with `mkdocs`, a python package.
6767

68-
1. Install the required packages.
68+
1. Install the required packages.
6969

7070
```
7171
pip install mkdocs mkdocs-exclude mkdocs-material mkdocs-macros-plugin
72-
```
72+
```
7373
If you encounter permissions issues, these might be reoslved by using the
7474
user option, with whatever user you are building as, e.g. `-u librenms`
7575

@@ -92,9 +92,9 @@ This will output all the documentation in html format to `/opt/librenms/out`
9292

9393
## Viewing docs
9494

95-
mkdocs includes it's own light-weight webserver for this purpose.
95+
mkdocs includes it's own light-weight webserver for this purpose.
9696

97-
Viewing is as simple as running the following command:
97+
Viewing is as simple as running the following command:
9898

9999
```
100100
$ mkdocs serve
@@ -105,7 +105,7 @@ INFO - Documentation built in 12.54 seconds
105105
INFO - Serving on http://127.0.0.1:8000
106106
<..>
107107
INFO - Start watching changes
108-
```
108+
```
109109

110110
Now you will find the complete set of LibreNMS documentation by opening your
111111
browser to `localhost:8000`.

doc/Developing/Dynamic-Config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If the user is overriding the option in config.php it would use the format `$con
1616

1717
## Translation
1818

19-
The config definition system inherently supports translation. You must add the English names in the
19+
The config definition system inherently supports translation. You must add the English names in the
2020
`resoures/lang/en/settings.php` file (and other languages if you can).
2121

2222
To update the javascript translation files, run:

doc/Developing/os/Health-Information.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ case the oid is indexed multiple times) are also available: if
142142
$index="1.20", then $subindex0="1" and $subindex1="20".
143143

144144
When referencing an oid in another table the full index will be used to match the other table.
145-
If this is undesirable, you may use a single sub index by appending the sub index after a colon to
145+
If this is undesirable, you may use a single sub index by appending the sub index after a colon to
146146
the variable name. Example `{{ $ifName:2 }}`
147147

148148
> `skip_values` can also compare items within the OID table against
@@ -214,7 +214,7 @@ the discovery code in php.
214214
The directory structure for sensor information is
215215
`includes/discovery/sensors/$class/$os.inc.php`. The format of all of
216216
the sensors follows the same code format which is to collect sensor information
217-
via SNMP and then call the `discover_sensor()` function; with the exception of state
217+
via SNMP and then call the `discover_sensor()` function; with the exception of state
218218
sensors which requires additional code. Sensor information is commonly found in an ENTITY
219219
mib supplied by device's vendor in the form of a table. Other mib tables may be used as
220220
well. Sensor information is first collected by
@@ -324,7 +324,7 @@ line walks the cmEntityObject table to get information about the chassis and lin
324324
this information we extract the model type which will identify which tables in the CM-Facility-Mib
325325
the ports are populated in. The program then reads the appropriate table into the `$pre_cache`
326326
array `adva_fsp150_ports`. This array will have OID indexies for each port, which we will use
327-
later to identify our sensor OIDs.
327+
later to identify our sensor OIDs.
328328

329329
```
330330
$pre_cache['adva_fsp150'] = snmpwalk_cache_multi_oid($device, 'cmEntityObjects', [], 'CM-ENTITY-MIB', null, '-OQUbs');

doc/Developing/os/Mem-CPU-Information.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To detect non-standard MIBs, they can be defined via Yaml.
1212
##### YAML
1313

1414
In order to successfully detect memory amount and usage, two of the for keys below are required. Some OS only
15-
provide a usage percentage, which will work, but a total RAM amount will not be displayed.
15+
provide a usage percentage, which will work, but a total RAM amount will not be displayed.
1616

1717
- total
1818
- used
@@ -36,7 +36,7 @@ including {{ }} parsing, skip_values, and precache.
3636
Valid data entry keys:
3737
3838
- `oid` oid to walk to collect processor data
39-
- `total` oid or integer total memory size in bytes (or precision),
39+
- `total` oid or integer total memory size in bytes (or precision)
4040
- `used` oid memory used in bytes (or precision)
4141
- `free` oid memory free in bytes (or precision)
4242
- `percent_used` oid of percentage of used memory

doc/Extensions/Agent-Setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ If you want to restrict which network adapter the agent listens on, do the follo
8282

8383

8484
## Windows
85-
1. Grab version 1.2.6b5 of the check_mk agent from the check_mk github repo (exe/msi or compile it yourself depending on your usage): https://github.com/tribe29/checkmk/tree/v1.2.6b5/agents/windows
85+
1. Grab version 1.2.6b5 of the check_mk agent from the check_mk github repo (exe/msi or compile it yourself depending on your usage): <https://github.com/tribe29/checkmk/tree/v1.2.6b5/agents/windows>
8686
2. Run the msi / exe
8787
3. Make sure your LibreNMS instance can reach TCP port 6556 on your target.

doc/Extensions/Applications.md

+37-36
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ by following the steps under the `SNMP Extend` heading.
113113
1. [NTP Client](#ntp-client) - SNMP extend
114114
1. [NTP Server/NTPD](#ntp-server-aka-ntpd) - SNMP extend
115115
1. [Nvidia GPU](#nvidia-gpu) - SNMP extend
116-
1. [Open Grid Scheduler](#opengridscheduler) - SNMP extend
116+
1. [Open Grid Scheduler](#open-grid-scheduler) - SNMP extend
117117
1. [Opensips](#opensips) - SNMP extend
118118
1. [OS Updates](#os-updates) - SNMP extend
119119
1. [PHP-FPM](#php-fpm) - SNMP extend
@@ -126,7 +126,7 @@ by following the steps under the `SNMP Extend` heading.
126126
1. [PowerDNS dnsdist](#powerdns-dnsdist) - SNMP extend
127127
1. [PowerMon](#powermon) - SNMP extend
128128
1. [Proxmox](#proxmox) - SNMP extend
129-
1. [Puppet Agent](#puppet_agent) - SNMP extend
129+
1. [Puppet Agent](#puppet-agent) - SNMP extend
130130
1. [PureFTPd](#pureftpd) - SNMP extend
131131
1. [Raspberry PI](#raspberry-pi) - SNMP extend
132132
1. [Redis](#redis) - SNMP extend
@@ -374,6 +374,7 @@ via `wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/
374374
A small python3 script that checks age and remaining validity of certificates
375375

376376
This script needs following packages on Debian/Ubuntu Systems:
377+
377378
* python3
378379
* python3-openssl
379380

@@ -495,7 +496,7 @@ wget https://github.com/librenms/librenms-agent/raw/master/snmp/docker-stats.sh
495496
4: Edit your snmpd.conf file (usually /etc/snmp/snmpd.conf) and add:
496497

497498
```
498-
extend docker /etc/snmp/docker-stats.sh
499+
extend docker /etc/snmp/docker-stats.sh
499500
```
500501

501502
5: Restart snmpd on your host
@@ -951,7 +952,7 @@ Extend` heading top of page.
951952

952953
To create your own custom munin scripts, please see this example:
953954

954-
```
955+
```bash
955956
#!/bin/bash
956957
if [ "$1" = "config" ]; then
957958
echo 'graph_title Some title'
@@ -1022,7 +1023,7 @@ Verify it is working by running `/usr/lib/check_mk_agent/local/mysql`
10221023

10231024
## SNMP extend
10241025

1025-
1: Copy the mysql script to the desired host.
1026+
1: Copy the mysql script to the desired host.
10261027
```
10271028
wget https://github.com/librenms/librenms-agent/raw/master/snmp/mysql -O /etc/snmp/mysql
10281029
```
@@ -1053,10 +1054,10 @@ configuration responsible for the localhost server:
10531054
```text
10541055
location /nginx-status {
10551056
stub_status on;
1056-
access_log off;
1057+
access_log off;
10571058
allow 127.0.0.1;
10581059
allow ::1;
1059-
deny all;
1060+
deny all;
10601061
}
10611062
```
10621063

@@ -1568,7 +1569,7 @@ script which method to use. The are several options to assist with testing, see
15681569

15691570
### Initial setup
15701571

1571-
1. Download the python script onto the host:
1572+
1. Download the python script onto the host:
15721573
```
15731574
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/powermon-snmp.py -O /usr/local/bin/powermon-snmp.py
15741575
```
@@ -1866,6 +1867,33 @@ SNMP extend script to monitor your (remote) RRDCached via snmp
18661867
extend rrdcached /etc/snmp/rrdcached
18671868
```
18681869

1870+
# SDFS info
1871+
1872+
A small shell script that exportfs SDFS volume info.
1873+
1874+
## SNMP Extend
1875+
1876+
1: Download the script onto the desired host (the host must be added
1877+
to LibreNMS devices)
1878+
1879+
```
1880+
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/sdfsinfo -O /etc/snmp/sdfsinfo
1881+
```
1882+
1883+
2: Make the script executable (chmod +x /etc/snmp/sdfsinfo)
1884+
1885+
3: Edit your snmpd.conf file (usually /etc/snmp/snmpd.conf) and add:
1886+
1887+
```
1888+
extend sdfsinfo /etc/snmp/sdfsinfo
1889+
```
1890+
1891+
4: Restart snmpd on your host
1892+
1893+
The application should be auto-discovered as described at the top of
1894+
the page. If it is not, please follow the steps set out under `SNMP
1895+
Extend` heading top of page.
1896+
18691897
# Seafile
18701898

18711899
SNMP extend script to monitor your Seafile Server
@@ -2108,7 +2136,7 @@ The application should be auto-discovered as described at the top of
21082136
the page. If it is not, please follow the steps set out under `SNMP
21092137
Extend` heading top of page.
21102138

2111-
# Option 2: Agent
2139+
## Option 2: Agent
21122140

21132141
[Install the agent](#agent-setup) on this device if it isn't already
21142142
and copy the `unbound.sh` script to `/usr/lib/check_mk_agent/local/`
@@ -2168,33 +2196,6 @@ The application should be auto-discovered as described at the top of
21682196
the page. If it is not, please follow the steps set out under `SNMP
21692197
Extend` heading top of page.
21702198

2171-
# SDFS info
2172-
2173-
A small shell script that exportfs SDFS volume info.
2174-
2175-
## SNMP Extend
2176-
2177-
1: Download the script onto the desired host (the host must be added
2178-
to LibreNMS devices)
2179-
2180-
```
2181-
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/sdfsinfo -O /etc/snmp/sdfsinfo
2182-
```
2183-
2184-
2: Make the script executable (chmod +x /etc/snmp/sdfsinfo)
2185-
2186-
3: Edit your snmpd.conf file (usually /etc/snmp/snmpd.conf) and add:
2187-
2188-
```
2189-
extend sdfsinfo /etc/snmp/sdfsinfo
2190-
```
2191-
2192-
4: Restart snmpd on your host
2193-
2194-
The application should be auto-discovered as described at the top of
2195-
the page. If it is not, please follow the steps set out under `SNMP
2196-
Extend` heading top of page.
2197-
21982199
# Voip-monitor
21992200

22002201
Shell script that reports cpu-load/memory/open-files files stats of Voip Monitor

0 commit comments

Comments
 (0)