Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

keithhackbarth/clowder_php_client

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clowder Python Client

This is the PHP repository for the Clowder PHP client.

How to test

Basic example for tracking memory usage on server Create a PHP file memory_usage.php

	<?php
		require "clowder.php";

		define("API_KEY", '29rTtCyrBfZvABBMMbne');

		$clowder = new Clowder(API_KEY);
		
		$clowder->ok([
			'name' => 'Memory Utilization',
			'value' => memory_get_usage()
		]);
	?>

How to use

Run the file and make sure it works

php memory_usage.php

Then create a cron job to run every 5 minutes

*/5 * * * * php memory_usage.php

Parameters

Passed as a PHP array

  • name: (string - REQUIRED) A unique name for the check. All checks with this name will be combined.
  • url: (string - optional) The url to send data to. Defaults to www.clowder.io/api
  • value: (float - optional) The value of the check (such as response time, queue length, rows processed, etc.)
  • status: (integer - optional) Whether our not the check is passing (1, 0, -1). If failing, an alert is send.
  • frequency: (integer or DateInterval object - optional) Duration in minutes until next check. If time passes without check, alert sounds.
  • alert: (function - optional) A function that passes or fails based on value

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.