Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revize Předchozí verze
Následující verze
Předchozí verze
ostatni:cacti [15.05.2012 10:54]
mtalma [instalace]
ostatni:cacti [13.03.2020 18:43] (aktuální)
Řádek 17: Řádek 17:
  
 ===== Skripty ===== ===== Skripty =====
 +==== cron ====
 +<code>
 +# Cacti
 +*/5 * * * * cactiuser /usr/bin/php /home/www/cacti/poller.php > /dev/null 2>&1
 +12  4 * * * cactiuser /usr/bin/php /home/www/cacti/cli/poller_reindex_hosts.php --id=All --qid=all > /dev/null 2>&1
 +12  5 * * * cactiuser /usr/bin/php /home/www/cacti/cli/poller_graphs_reapply_names.php -id=All > /dev/null 2>&1
 +</code>
  
 ==== iptables.pl ==== ==== iptables.pl ====
Řádek 104: Řádek 111:
 ?> ?>
 </code> </code>
 +
 +==== rrdupdate.sh ====
 +  *aktualizace maximálních hodnot
 +<code bash>
 +#!/bin/sh
 +
 +RRA_PATH=/var/www/cacti/rra
 +for rdd in `ls $RRA_PATH | grep traffic`
 +do
 +    rrdtool tune $RRA_PATH/$rdd --maximum traffic_in:1000000000 --maximum traffic_out:1000000000
 +done
 +</code>
 +
 +==== Ubiquiti wifi ====
 +  *{{:ostatni:cacti_graph_template_ubiquity_wifi.xml|}}
 +<code perl>
 +#!/usr/bin/perl
 +use strict;
 +#use warnings;
 +
 +use LWP::UserAgent;
 +use HTTP::Cookies;
 +use JSON;
 +
 +if (($#ARGV+1) ne 4) {
 + exit();
 +}
 +
 +my $host = $ARGV[0];
 +my $port = $ARGV[1];
 +my $user = $ARGV[2];
 +my $pass = $ARGV[3];
 +
 +my $cookie_jar = HTTP::Cookies->new();
 +my $browser  = LWP::UserAgent->new();
 +my $response = '';
 +my $json = JSON->new();
 +
 +$browser->cookie_jar($cookie_jar);
 +$response = $browser->get(
 +    "https://${host}:${port}/login.cgi"
 +);
 +
 +$response = $browser->post(
 +    "https://${host}:${port}/login.cgi",
 +    Content_Type => 'form-data',
 +    Content => [
 +    username => ${user},
 +    password => ${pass},
 +    ],
 +);
 +
 +$response = $browser->get(
 +    "https://${host}:${port}/status.cgi"
 +);
 +
 +#print ("apmac:"        .$json->decode($response->content)->{wireless}->{apmac} ." ");
 +print ("ccq:"   .$json->decode($response->content)->{wireless}->{ccq}/10 ." ");
 +print ("signal:".$json->decode($response->content)->{wireless}->{signal} ." ");
 +print ("noisef:".$json->decode($response->content)->{wireless}->{noisef} ." ");
 +#print ("snr:"   .$json->decode($response->content)->{wireless}->{noisef} ." ");
 +print ("txrate:".$json->decode($response->content)->{wireless}->{txrate} ." ");
 +print ("rxrate:".$json->decode($response->content)->{wireless}->{rxrate} ." ");
 +print ("channel:".$json->decode($response->content)->{wireless}->{channel});
 +</code>
 +
 +
  
 ===== XML configs ===== ===== XML configs =====
ostatni/cacti.1337079297.txt.gz · Poslední úprava: 13.03.2020 18:43 (upraveno mimo DokuWiki)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0