Skip to content

learnkit-dev/remote-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Monitor

A Laravel package for remote monitoring with Elasticsearch logging integration.

Installation

Install the package via Composer:

composer require learnkit/remote-monitor

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="LearnKit\RemoteMonitor\RemoteMonitorServiceProvider"

Configure your environment variables:

REMOTE_ELASTIC_HOST=your-elasticsearch-host
REMOTE_ELASTIC_API_KEY=your-api-key
REMOTE_ELASTIC_LOGS_INDEX=remote-logs

Usage

Use the rlog() helper function to log messages to Elasticsearch:

// Simple logging
rlog('User logged in', ['user_id' => 123]);

// Get logger instance
$logger = rlog();
$logger->info('Custom message');
$logger->error('Error occurred', ['error' => $exception->getMessage()]);

Requirements

  • PHP ^8.3
  • Laravel ^10.0|^11.0|^12.0

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages