All Projects → mangati → cachet

mangati / cachet

Licence: MIT license
Cachet PHP client.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to cachet

awesome-incident-response-pro-bono
This repository is a curated list of pro bono incident response entities.
Stars: ✭ 16 (+14.29%)
Mutual labels:  incident
WELA
WELA (Windows Event Log Analyzer): The Swiss Army knife for Windows Event Logs! ゑ羅(ウェラ)
Stars: ✭ 442 (+3057.14%)
Mutual labels:  incident
CachetSDK
A PHP SDK for Cachet, providing a full functionality access.
Stars: ✭ 20 (+42.86%)
Mutual labels:  cachet
SDK
The PHP SDK for Cachet.
Stars: ✭ 13 (-7.14%)
Mutual labels:  cachet
hayabusa
Hayabusa (隼) is a sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
Stars: ✭ 908 (+6385.71%)
Mutual labels:  incident
zabbix-cachet
Python script which sync Zabbix IT Services with Cachet
Stars: ✭ 78 (+457.14%)
Mutual labels:  cachet
Cachet
📛 An open source status page system for everyone.
Stars: ✭ 12,478 (+89028.57%)
Mutual labels:  cachet
cachet-monitor
Auto update program for Cachet status pages
Stars: ✭ 26 (+85.71%)
Mutual labels:  cachet
incident-response-plan-template
A concise, directive, specific, flexible, and free incident response plan template
Stars: ✭ 288 (+1957.14%)
Mutual labels:  incident
demo-first-response-online
First Response Online is a communication and collaboration platform built to support first responders. It lets police officers, fire fighters, and paramedics share critical data with each other in near real-time. It supports iPhone, iPad, and PC and integrates with computer aided dispatch and GPS tracking. Units in the field can update their sta…
Stars: ✭ 60 (+328.57%)
Mutual labels:  incident

Cachet

Cachet PHP client.

About Cachet

Cachet is an open source status page system written in PHP. https://github.com/CachetHQ/Cachet.

Usage

Setup

use Mangati\Cachet\Client;

$endpoint = 'https://demo.cachethq.io/api/v1/';
$token    = '9yMHsdioQosnyVK4iCVR';

$client = new Client($endpoint, $token);

Components

Get components

$components = $client->getComponents();

foreach ($components as $component) {
    echo $component->getName();
}

Sorting

$components = $client->getComponents([
    'sort' => 'id',
    'order' => 'desc'
]);

Get by id

$component = $client->getComponent(3);

Create new component

$component = new Component();
$component->setName('My new component');
$component->setDescription('Component description');
$component->setLink('https://github.com/mangati/cachet');
$component->setStatus(Component::STATUS_OPERATIONAL);

$client->addComponent($component);

Update an existing component

$component = new Component();
$component->setId(3);
$component->setName('My new component (updated)');

$client->updateComponent($component);

Delete an existing component

$id = 3;

$client->deleteComponent($id);

Incidents

Get incidents

$incidents = $client->getIncidents();

foreach ($incidents as $incident) {
    echo $incident->getName();
}

Sorting

$incidents = $client->getIncidents([
    'sort' => 'id',
    'order' => 'desc'
]);

Get by id

$incident = $client->getIncident(3);

Create new incident

$incident = new Incident();
$incident->setName('My new incident');
$incident->setMessage('incident message');
$incident->setStatus(Incident::STATUS_WATCHING);

$client->addIncident($incident);

Update an existing incident

$incident = new Incident();
$incident->setId(3);
$incident->setStatus(Incident::STATUS_FIXED);

$client->updateIncident($incident);

Delete an existing incident

$id = 3;

$client->deleteIncident($id);

Known issue

Doctrine annotation error:

PHP Fatal error:  Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property (...) does not exist, or could not be auto-loaded.'

Can fix it registering the JMS namespace:

Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace('JMS\Serializer\Annotation', $rootDir . "/vendor/jms/serializer/src");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].