Skip to content

Instantly share code, notes, and snippets.

@etobi
etobi / gist:7590aee22f9b84b69d73
Last active January 17, 2017 09:00
Monitoring mit Icinga (Nagios) auf Raspberry PI installieren
# aktuelles rasbian installieren
# hostname, password etc setzen
sudo raspi-config
# alles auf aktuellen Stand bringen
sudo apt-get update
sudo apt-get upgrade
# Feste IP konfigurieren
diff --git i/Classes/Domain/Repository/DceRepository.php w/Classes/Domain/Repository/DceRepository.php
index dafb5dd..fa07347 100644
--- i/Classes/Domain/Repository/DceRepository.php
+++ w/Classes/Domain/Repository/DceRepository.php
@@ -166,9 +166,10 @@ class DceRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
*/
protected function processFillingFields(
\ArminVieweg\Dce\Domain\Model\Dce $dce,
- array $fieldList,
+ array $fieldList = null,
@etobi
etobi / Systemlog.php
Created September 30, 2017 15:25
Syslog in Slack posten
<?php
namespace Foo\Bar\Hooks;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Systemlog
{
private $severityLabel = [
GeneralUtility::SYSLOG_SEVERITY_INFO => 'INFO',
@etobi
etobi / log2slack
Created November 4, 2014 10:31
Simple shell script to monitor a log file (e.g. TYPO3 syslog) and push it to a slack channel
#!/bin/sh
tail -n 1 -f /var/path/to/file.log | while read line; do
echo $line | grep -v "PATTERN TO IGNORE"
if `test $? -eq 0`; then
cleanLine=`echo $line | tr -d '"'`
payload="payload={\"channel\": \"#channel\", \"username\": \"dev:typo3-sys.log\", \"text\": \"$cleanLine\", \"icon_emoji\": \":interrobang:\"}"
curl -X POST --data-urlencode "$payload" https://TEAM.slack.com/services/hooks/incoming-webhook\?token\=TOKEN
fi
done