remove munin doc

cli
Thibault Duplessis 2017-10-18 12:22:10 -05:00
parent 3140ff9108
commit 5e6be6f068
5 changed files with 0 additions and 115 deletions

View File

@ -1,21 +0,0 @@
#!/usr/bin/env php
<?php
if(isset($argv[1]) && 'config' == $argv[1]) {
echo "graph_title Lichess game index growth
graph_args --base 1000 -l 0
graph_vlabel games
graph_category lichess
games.label games
games.draw AREA
games.type DERIVE
";
exit;
}
echo "games.value ";
$response = file_get_contents("http://localhost:9200/lila/game/_count");
$count = json_decode($response)->count;
echo $count;
echo "\n";

View File

@ -1,32 +0,0 @@
#!/usr/bin/env php
<?php
$logs = array(
"main_log" => 'cat /home/lila/logs/output.log | wc -l',
"ai_log" => 'ssh ai2.lichess.org "cat /home/lila/logs/output.log | wc -l"',
"mongo_log" => 'cat /var/log/mongodb/mongodb.log | wc -l',
"nginx_log" => 'cat /var/log/nginx/lila.error.log | wc -l'
);
if(isset($argv[1]) && 'config' == $argv[1]) {
echo "graph_title Lichess log size growth
graph_args --base 1000 --lower-limit 0.01 --logarithmic
graph_vlabel growth
graph_category lichess
";
foreach ($logs as $log => $c) {
$name = str_replace('_', ' ', $log);
echo "$log.label $name
$log.draw LINE
$log.type DERIVE
$log.min 0
";
}
exit;
}
foreach ($logs as $log => $command) {
echo "$log.value ";
echo exec($command) . "\n";
}

View File

@ -1,20 +0,0 @@
#!/usr/bin/env php
<?php
if(isset($argv[1]) && 'config' == $argv[1]) {
echo "graph_title Lichess new players per day
graph_args --base 1000 -l 0
graph_vlabel players/day
graph_category lichess
players.label players/day
players.draw AREA
";
exit;
}
echo "players.value ";
$mongo = new Mongo();
$collection = $mongo->selectCollection('lichess', 'user2');
echo $collection->count(array('createdAt' => array('$gte' => new MongoDate(date_create('- 1 day')->getTimestamp()))));
echo "\n";

View File

@ -1,20 +0,0 @@
#!/usr/bin/env php
<?php
if(isset($argv[1]) && 'config' == $argv[1]) {
echo "graph_title Lichess Forum posts per today
graph_args --base 1000 -l 0
graph_vlabel posts/day
graph_category lichess
posts.label posts/day
posts.draw AREA
";
exit;
}
echo "posts.value ";
$mongo = new Mongo();
$collection = $mongo->selectCollection('lichess', 'f_post');
echo $collection->count(array('createdAt' => array('$gte' => new MongoDate(date_create('- 1 day')->getTimestamp()))));
echo "\n";

View File

@ -1,22 +0,0 @@
#!/usr/bin/env ruby
script = 'db.user2.group({cond:{"settings.theme":{$exists:true}},key:{"settings.theme":true},initial:{s:0},reduce:function(o,p){p.s++;}}).forEach(function(y) { print(y["settings.theme"] + ".value " + y.s);});'
command = 'mongo lichess --eval \'%s\'' % script
themes = ['green', 'brown', 'blue', 'grey', 'wood', 'canvas']
if ARGV.include? 'config'
puts "graph_title Lichess themes popularity
graph_args --base 1000 -l 0
graph_vlabel users
graph_category lichess
"
themes.each do |theme|
puts "#{theme}.label #{theme}
#{theme}.draw LINE
"
end
else
puts IO.popen(command).readlines.to_a[2..-1].join
end