Download the PHP package ocolin/easymt without Composer
On this page you can find all versions of the php package ocolin/easymt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ocolin/easymt
More information about ocolin/easymt
Files in ocolin/easymt
Package easymt
Short Description Simple wrapper for evil freelancers RouterOS API client
License MIT
Informations about the package easymt
About
This library provides a simple and basic interface to useing evilfreelancer's RouterOS API as well as SNMP calls for Mikrotik devices.
This library is going away and being replaced by ocolin/routeros
Requirements
PHP 8.3+
Adding a composer module:
In your composer.json
Then run
API
Most of the funcionality comes from:
https://github.com/EvilFreelancer/routeros-api-php
This wrapper simply allows you to use environment variables in advance.
Settings
Arguments
Any host related arguments such as IP will take precedent the config file or environment variables
Environment Variables
Environment variables will override any settings from the default config file. A prefix is required so that multiple entries can be stored. The prefix will be appended to the beginning of the environment variable used. Here are the defaults:
With prefix 'EXAMPLE1':
Default config file
You can also edit src/config.json if you don't want to use arguments or environment variables. This will however only allow for a single device to be used.
Examples
Example 1: Using settings in config.json
Example 2: Using parameters:
Example 3: Using environment variables
Example 4: Using argument ip and local environment variables
SNMP
Calls
| Function | Description |
|---|---|
| port_Alias( int ) | Get name of alias for a port |
| ports() | Get list of port information |
| ethernet() | Get list of ethernet interface data |
| port_Name( int ) | Get name of a port |
| system() | Get system information |
| iPs() | List of IP address information |
| routes() | List of IP routes |
| media() | List of Media information |
| forward() | List of forwarding entries |
| ARP() | List ARP table |
| uptime() | Uptime infromation |
| storage() | List of storage information |
| processor() | Processor information |
| organization() | List of orgnaization information |
| dot1dTpFdbEntry() | List of bridge forwarding information |
| power() | List of power related information |
| health() | Device health information |
| license() | License information |
| os() | Information about OS |
| neighbors() | List of neighbor information |
| ifStats() | List of interface statistic information |
| partitions() | List of partition information |
| optical() | List of optical interface information |
| leaseCount() | Get number of DHCP leases |
Example
Example 1: Using environment variable
Example 2: Using argument variables
Example 3: Using default SNMP settings
Example Output:
All versions of easymt with dependencies
evilfreelancer/routeros-api-php Version ^1.5
ocolin/easyenv Version ^3.0
ocolin/easysnmp Version ^2.1