# Meraki
# Introduction
The purpose of this plugin is to monitor meraki devices, appliance, switch and wireless.
The plugin connects with the rest api of Meraki, in order to obtain all the metrics.
# Compatibility matrix
**Systems where tested** | Rocky linux, Fedora 34 |
**Systems where it works** | Any linux system |
# Pre requisites
\- Connectivity to the endpoints provided by the API is required.
\- A bearer token is required for authentication.
\- Groups of agents must be defined as groups of agents, groups whose name contains the store code.
\- The plugin server must be enabled in the environment.
\- The dataserver must be enabled in the environment.
# Parameters
**Meraki connection parameters**
**--url** | API connection url, example : https://api.meraki.com/api/v1 . Default: https://api.meraki.com/api/v1 |
**--token** | Token bearer required for authentication |
**--id** | Store ID, which will identify if the group exists in Pandora and will create the agent in it, and if the network exists in Meraki. |
**--organization** | ID of the organization in which the networks will be scanned. |
**--timespan** | Monitoring interval for switch port statistics. |
**Parámetros configuración Pandora**
**--agent\_prefix**
| Prefix for all agents created by the plugin
|
**--module\_prefix** | Prefix for all modules created by the plugin |
**--location** | Secondary groups added to the agent |
**--interval** | Agent monitoring interval |
**--temporal** | PandoraFMS temporary directory |
**--data\_dir**
| PandoraFMS Data Directory |
**--group** | Agent group. |
**--transfer\_mode**
| Data transfer mode, local or tentacle |
**--tentacle\_client**
| Tentacle client path, by default “tentacle\_client”. |
**--tentacle\_opts**
| Additional tentacle options
|
**--tentacle\_port**
| Tentacle Port
|
**--tentacle\_address**
| tentacle IP |
**Parámetros Extra**
**--scan\_appliance** | Disable scanning of appliance devices with 0. Default enabled to 1. |
**--scan\_switch** | Disable scanning of switch devices with 0. By default set to 1. |
**--scan\_wireless** | Disable scanning of wireless devices with 0. Default enabled to 1. |
**--log\_file** | Path where the log file will be saved, for example :
/tmp/meraki\_logfile.txt
|
# Manual execution
The plugin execution format is as follows:
```
./pandora_meraki --id < id > --url < url > --token < token > --location < location > --organization < organization > --timespan < interval switch port data monitoring in seconds >
--module_prefix < module prefix > --agent_prefix < agent prefix >
[ --scan_appliance < 1 or 0 > ] [ --scan_switch < 1 or 0 > ] [ --scan_wireless < 1 or 0 > ]
[ --transfer_mode < local o tentacle > ] [ --tentacle_port < tentacle_port > ] [ --tentacle_address < tentacle_address > ] [ --tentacle_client < tentacle client path ] [ --tentacle_opts < tentacle extra options ]
[ --data_dir < data dir > ] [ --group < group > ] [ --temporal < temporary directory path > ] [ --interval < interval agent monitorings in seconds > ] [--log_file < log file >]
```
# Configuration in PandoraFMS
To configure the plugin in PandoraFMS, the following steps must be followed:
**1. Upload the plugin to PandoraFMS, for example in the following path:**
```
/usr/share/pandora_server/util/plugin
```
**2. Go to the plugins section and create a new one:**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-01/VNOimagen.png)
**3. Name, description and timeout are added:**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-02/image.png)
**4. The path of the plugin is added to the command and the necessary parameters for its execution.**
For each parameter a macro must be configured, being the syntax of this macro the following : \_fieldx\_, being x the positional number of the parameter, for example in the following image we see the parameters that are mandatory, --id, --url, --token, --agent\_prefix, --localization and --tentacle\_address since all the others can be used with the default values.
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-02/G2nimage.png)
**5. The above macros are configured, adding in each one the value of the parameter:**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-02/3g0image.png)
**6. Once configured, you should create a module in an agent that executes the plugin. In the modules menu of an agent we create a new plugin type module:**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-01/503imagen.png)
**7. In the module configuration menu, we name it, select the plugin configured before and click on “create”.**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-02/Fcbimage.png)
**8. The agents will be created in the next execution of the plugin:**
[](https://pandorafms.com/guides/public/uploads/images/gallery/2024-02/oPIimage.png)
# Agents and modules generated by the plugin
Running the plugin with the monitoring of all types of device abilities will create the following agents:
- One agent for each appliance type device that exists in the network that matches the id entered by parameter, will be created in the specified groups, and will contain the IP.
< prefix >< switch name > |
With the following modules
< module prefix >status | Device status, 1 if online, 0 otherwise. |
< module prefix >perfScore | Indicates how busy the device is. |
And one for each interface :
< module prefix >< interface name > | Interface status. |
- One agent for each switch type device that exists in the network that matches the id entered by parameter, will be created in the specified groups, and will contain the IP.
< prefix >< switch name > |
With the following modules
< prefix module >status | Device status, 1 if online, 0 otherwise. |
And the following for each port:
< port ID >\_ifOperStatus | 1 if enabled, 0 if not enabled |
< port ID >.ifInOctets | Total traffic sent in kb |
< port ID >.T\_ifOutOctets | Total traffic received in kb |
- An agent for each wireless device that exists in the network that matches the id entered by parameter, will be created in the specified groups, and will contain the IP
< prefix >< name switch > |
With the following modules
< module prefix >status | Device status, 1 if online, 0 otherwise. |
< module prefix >totalKbps | Kb of total last day usage |
< module prefix >sentKbps | Kb of usage on the last day sent |
< module prefix >receivedKbps | Kb of usage on the last day received |
< module prefix >clientCount | Total customer connections |