Present readers with smart quotes
Before this change, this documentation in this repo would present the reader with U+0022 QUOTATION MARKs. According to Unicode, it’s better to use U+201C LEFT DOUBLE QUOTATION MARK and U+201D RIGHT DOUBLE QUOTATION MARK (Source: https://www.unicode.org/charts/PDF/U0000.pdf#page=3).
This commit is contained in:
parent
80d5169b81
commit
827d19e54b
22 changed files with 61 additions and 61 deletions
|
|
@ -970,7 +970,7 @@ To configure an *SNMP version 2c community*, use either the [option]`rocommunity
|
|||
_directive_ _community_ _source_ _OID_
|
||||
----
|
||||
|
||||
… where _community_ is the community string to use, _source_ is an IP address or subnet, and _OID_ is the SNMP tree to provide access to. For example, the following directive provides read-only access to the `system` tree to a client using the community string "redhat" on the local machine:
|
||||
… where _community_ is the community string to use, _source_ is an IP address or subnet, and _OID_ is the SNMP tree to provide access to. For example, the following directive provides read-only access to the `system` tree to a client using the community string "`redhat`" on the local machine:
|
||||
|
||||
[subs="quotes"]
|
||||
----
|
||||
|
|
@ -990,7 +990,7 @@ SNMPv2-MIB::sysLocation.0 = STRING: Datacenter, Row 3, Rack 2
|
|||
----
|
||||
|
||||
.Configuring SNMP Version 3 User
|
||||
To configure an *SNMP version 3 user*, use the [command]#net-snmp-create-v3-user# command. This command adds entries to the `/var/lib/net-snmp/snmpd.conf` and `/etc/snmp/snmpd.conf` files which create the user and grant access to the user. Note that the [command]#net-snmp-create-v3-user# command may only be run when the agent is not running. The following example creates the "sysadmin" user with the password "redhatsnmp":
|
||||
To configure an *SNMP version 3 user*, use the [command]#net-snmp-create-v3-user# command. This command adds entries to the `/var/lib/net-snmp/snmpd.conf` and `/etc/snmp/snmpd.conf` files which create the user and grant access to the user. Note that the [command]#net-snmp-create-v3-user# command may only be run when the agent is not running. The following example creates the "`sysadmin`" user with the password "`redhatsnmp`":
|
||||
|
||||
----
|
||||
~]# systemctl stop snmpd.service
|
||||
|
|
@ -1018,7 +1018,7 @@ _directive_ _user_ [option]`noauth`|[option]`auth`|[option]`priv` _OID_
|
|||
|
||||
… where _user_ is a username and _OID_ is the SNMP tree to provide access to. By default, the Net-SNMP Agent Daemon allows only authenticated requests (the [option]`auth` option). The [option]`noauth` option allows you to permit unauthenticated requests, and the [option]`priv` option enforces the use of encryption. The [option]`authpriv` option specifies that requests must be authenticated and replies should be encrypted.
|
||||
|
||||
For example, the following line grants the user "admin" read-write access to the entire tree:
|
||||
For example, the following line grants the user "`admin`" read-write access to the entire tree:
|
||||
|
||||
[subs="quotes"]
|
||||
----
|
||||
|
|
@ -1301,7 +1301,7 @@ NET-SNMP-EXTEND-MIB::nsExtendResult."httpd_pids" = INTEGER: 8
|
|||
NET-SNMP-EXTEND-MIB::nsExtendOutLine."httpd_pids".1 = STRING:
|
||||
----
|
||||
|
||||
Note that the exit code ("8" in this example) is provided as an INTEGER type and any output is provided as a STRING type. To expose multiple metrics as integers, supply different arguments to the script using the [option]`extend` directive. For example, the following shell script can be used to determine the number of processes matching an arbitrary string, and will also output a text string giving the number of processes:
|
||||
Note that the exit code ("`8`" in this example) is provided as an INTEGER type and any output is provided as a STRING type. To expose multiple metrics as integers, supply different arguments to the script using the [option]`extend` directive. For example, the following shell script can be used to determine the number of processes matching an arbitrary string, and will also output a text string giving the number of processes:
|
||||
|
||||
----
|
||||
#!/bin/sh
|
||||
|
|
@ -1385,7 +1385,7 @@ The OID `.1.3.6.1.4.1.8072.9999.9999` (`NET-SNMP-MIB::netSnmpPlaypen`) is typica
|
|||
|
||||
====
|
||||
|
||||
The handler function will be called with four parameters, `HANDLER`, `REGISTRATION_INFO`, `REQUEST_INFO`, and `REQUESTS`. The `REQUESTS` parameter contains a list of requests in the current call and should be iterated over and populated with data. The `request` objects in the list have get and set methods which allow for manipulating the `OID` and `value` of the request. For example, the following call will set the value of a request object to the string "hello world":
|
||||
The handler function will be called with four parameters, `HANDLER`, `REGISTRATION_INFO`, `REQUEST_INFO`, and `REQUESTS`. The `REQUESTS` parameter contains a list of requests in the current call and should be iterated over and populated with data. The `request` objects in the list have get and set methods which allow for manipulating the `OID` and `value` of the request. For example, the following call will set the value of a request object to the string "`hello world`":
|
||||
|
||||
----
|
||||
$request->setValue(ASN_OCTET_STR, "hello world");
|
||||
|
|
@ -1420,7 +1420,7 @@ for($request = $requests; $request; $request = $request->next()) {
|
|||
}
|
||||
----
|
||||
|
||||
When `getMode` returns `MODE_GET`, the handler analyzes the value of the `getOID` call on the `request` object. The `value` of the `request` is set to either `string_value` if the OID ends in ".1.0", or set to `integer_value` if the OID ends in ".1.1". If the `getMode` returns `MODE_GETNEXT`, the handler determines whether the OID of the request is ".1.0", and then sets the OID and value for ".1.1". If the request is higher on the tree than ".1.0", the OID and value for ".1.0" is set. This in effect returns the "next" value in the tree so that a program like [command]#snmpwalk# can traverse the tree without prior knowledge of the structure.
|
||||
When `getMode` returns `MODE_GET`, the handler analyzes the value of the `getOID` call on the `request` object. The `value` of the `request` is set to either `string_value` if the OID ends in "`.1.0`", or set to `integer_value` if the OID ends in "`.1.1`". If the `getMode` returns `MODE_GETNEXT`, the handler determines whether the OID of the request is "`.1.0`", and then sets the OID and value for "`.1.1`". If the request is higher on the tree than "`.1.0`", the OID and value for "`.1.0`" is set. This in effect returns the "`next`" value in the tree so that a program like [command]#snmpwalk# can traverse the tree without prior knowledge of the structure.
|
||||
|
||||
The type of the variable is set using constants from `NetSNMP::ASN`. See the [command]#perldoc# for `NetSNMP::ASN` for a full list of available constants.
|
||||
|
||||
|
|
|
|||
Reference in a new issue