so guess servers are down?

Moderator: Littlabit

Post Reply
Thott
Whee!
Posts: 345
Joined: Mon Feb 22, 2016 10:57 am

so guess servers are down?

Post by Thott » Wed Nov 07, 2018 4:14 pm

servers down? so is TS for me. So just checking it's not just me.
Image

User avatar
oneyedranger
Whee!
Posts: 1095
Joined: Wed Jun 04, 2008 1:41 am
Location: In your mind creating those bad bad thoughts

Re: so guess servers are down?

Post by oneyedranger » Wed Nov 07, 2018 4:16 pm

I am starring at log in screen in anticipation...the one day I am home figures

Jhereg
Whee!
Posts: 4727
Joined: Mon Sep 13, 2004 9:11 pm

Re: so guess servers are down?

Post by Jhereg » Wed Nov 07, 2018 4:22 pm

Yeah, about 2/3 of the servers are down, got to server select finally and Drinal is down.

User avatar
Moonshaadow
Whee!
Posts: 22
Joined: Wed Jun 15, 2016 3:55 pm

Re: so guess servers are down?

Post by Moonshaadow » Wed Nov 07, 2018 4:28 pm

oh it must be family time out time

User avatar
Moonshaadow
Whee!
Posts: 22
Joined: Wed Jun 15, 2016 3:55 pm

Re: so guess servers are down?

Post by Moonshaadow » Wed Nov 07, 2018 4:29 pm

TS been down all day for our server. I been able to connect into UF's and the public one/

User avatar
Andreii
Whee!
Posts: 57
Joined: Wed Nov 05, 2014 4:44 pm
Location: Neriak
Contact:

Re: so guess servers are down?

Post by Andreii » Wed Nov 07, 2018 4:33 pm

The Everquest forums are down too. Also, the Server Status indicator on the main EQ page shows all servers as up. I'm guessing it and theb servers stopped communicating.

--Endered

User avatar
Glauri
Whee!
Posts: 2348
Joined: Fri May 29, 2009 7:15 am
Location: TEXAS!

Re: so guess servers are down?

Post by Glauri » Wed Nov 07, 2018 4:37 pm

Thott wrote:
Wed Nov 07, 2018 4:14 pm
servers down? so is TS for me. So just checking it's not just me.
Same for me! /sigh
Do not regret growing older. It is a privilege denied to many.
Glauri

User avatar
Littlabit
Meanie
Posts: 3501
Joined: Tue Feb 27, 2007 6:01 pm
Location: TN
Contact:

Re: so guess servers are down?

Post by Littlabit » Wed Nov 07, 2018 4:38 pm

IF team speak servers are down someone needs to send me a message so that I can reboot it and fix it.
Littlabit D'might 110 Cleric
GL of Celestial Navigators (Mushroom follower)
"Life is too short for drama & petty things, so kiss slowly, laugh insanely, love truly and forgive quickly"

Thott
Whee!
Posts: 345
Joined: Mon Feb 22, 2016 10:57 am

Re: so guess servers are down?

Post by Thott » Wed Nov 07, 2018 4:44 pm

This should help with monitoring teamspeak and alert you when it's down.

Code: Select all

#!/usr/bin/perl

#Parameter:
# -H            host
# -h            help
# -t            telnet port (default: 10011)
# -u            (Optional) A user name
# -p            (Optional) A password
# -w            warning usercount percent
# -c            Critical usercount percent
# -s            Server instance id
# -V            version
# -v            verbose

use strict;
use IO::Socket;
use Getopt::Long;
use Time::HiRes qw(gettimeofday);

use lib "/usr/lib/nagios/plugins/" ;
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use vars qw($PROGNAME $opt_v $opt_V $opt_h $opt_H $opt_w $opt_c $opt_t $opt_l $opt_u $opt_p $opt_sid @servers $duration %EscapePattern);

my $PROGNAME="check_teamspeak3";
my $VERSION="2.0";

my $DEFAULT_USERCNT_WARN        = 70;
my $DEFAULT_USERCNT_CRIT        = 90;
my $DEFAULT_TELNET_PORT         = 10011;

Getopt::Long::Configure('bundling');
GetOptions
	("V"   => \$opt_V, "version"       => \$opt_V,
	 "h"   => \$opt_h, "help"          => \$opt_h,
	 "l"   => \$opt_l, "list"          => \$opt_l,
	 "w=f" => \$opt_w, "warning=f"     => \$opt_w,
	 "c=f" => \$opt_c, "critical=f"    => \$opt_c,
	 "u=s" => \$opt_u, "user=s"    	   => \$opt_u,
	 "s=i" => \$opt_sid, "sid=i"       => \$opt_sid,
	 "p=s" => \$opt_p, "password=s"    => \$opt_p,
	 "H=s" => \$opt_H, "hostname=s"    => \$opt_H,
	 "t=f" => \$opt_t, "telnetport=f"  => \$opt_t);

if ($opt_V) {
	print_revision($PROGNAME, $VERSION);
	exit $ERRORS{'OK'};
}

if ($opt_h) {
	print_help();
	exit $ERRORS{'OK'};
}

unless ($opt_H) {
	print "No target host specified\n";
	print_usage();
	exit $ERRORS{'UNKNOWN'};
}

my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
($host) || print_usage("Invalid host: $opt_H\n");

($opt_w) || ($opt_w = $DEFAULT_USERCNT_WARN);
my $uwarn = $1 if ($opt_w =~ /([0-9]{1,2}|100)+/);
($uwarn) || print_usage("Invalid warning threshold: $opt_w\n");

($opt_c) || ($opt_c = $DEFAULT_USERCNT_CRIT);
my $ucrit = $1 if ($opt_c =~ /([0-9]{1,2}|100)+/);
($ucrit) || print_usage("Invalid critical threshold: $opt_c\n");

unless ($uwarn <= $ucrit){
	print "Critical usercpunt must not be smaller than warning usercpunt\n";
	print_usage();
	exit $ERRORS{'UNKNOWN'};
}

unless ($opt_t) {
	$opt_t = $DEFAULT_TELNET_PORT;
}

if ($opt_u) {
	unless ($opt_p) {
		print "No password specified\n";
		print_usage();
		exit $ERRORS{'UNKNOWN'};
	}
}

if ($opt_l) {
	&list_servers();
	my $ret = "UNKNOWN: Active servers : ";
	foreach my $server (@servers) {
		$ret .= $server." ";
	}
	print  $ret."\n";
	exit $ERRORS{'UNKNOWN'};
}

# Just in case of problems, let's not hang Nagios
$SIG{'ALRM'} = sub {
	print ("ERROR: No response from teamspeakserver (alarm)\n");
	exit $ERRORS{"UNKNOWN"};
};
alarm($TIMEOUT);

sub connect_serverquery {
	my $sock = IO::Socket::INET->new(qq($opt_H:$opt_t));
	unless ($sock) {
		print ("ERROR: Unable to open Socket on $opt_H:$opt_t\n");
		exit $ERRORS{"CRITICAL"};
	}
	return $sock;
}

sub login {
	my ($sock) = @_;

	if ($opt_u) {
		print $sock "login ".EscapeLogin($opt_u)." ".EscapeLogin($opt_p)."\n";
	}

	if ($opt_sid) {
		print $sock "use sid=$opt_sid\n";
	}
}

sub list_servers {
	my $starttime = gettimeofday;

	my $sock = connect_serverquery();
	login($sock);

	print $sock qq(serverlist\nquit\n);
	while(<$sock>) {
		chomp;
		foreach (split(/\|/)) {
			if (/virtualserver_port=(\d+)/) {
				push @servers,$1;
			}
		}
	}
	my $endtime = gettimeofday;
	$duration += $endtime - $starttime;
	return @servers;
}

sub EscapeLogin{
	my $str=shift;
	$str=~s/^\s*(.*)\s*$/$1/g;
	$str=~s/\\/\\\\/g;
	$str=~s/\//\\\//g;
	$str=~s/ /\\s/g;
	$str=~s/\|/\\p/g;
	$str=~s/;/\\;/g;
	return $str;
}

get_data();

sub get_data {
	my $starttime = gettimeofday;
	my $currentusers = 0;
	my $maxusers = 0;
	my $userpercent = 0;
	my $bytesup = 0;
	my $bytesdown = 0;
	my $uptime = 0;

	my $sock = connect_serverquery();
	login($sock);

	print $sock qq(hostinfo\nquit\n);
	while(<$sock>){
		foreach (split(/\|/)) {
			if(/virtualservers_total_clients_online=(\d+)/){
				($currentusers) = $1;
			}
			if(/virtualservers_total_maxclients=(\d+)/){
				($maxusers) = $1;
			}
			if(/connection_bytes_sent_total=(\d+)/){
				($bytesup) = $1;
			}
			if(/connection_bytes_received_total=(\d+)/){
				($bytesdown) = $1;
			}
			if(/instance_uptime=(\d+)/){
				($uptime) = $1;
			}
		}
	}
	my $endtime = gettimeofday;
	$duration += $endtime - $starttime;
	$duration = sprintf "%2f", $duration;
	my $perfdata = "users=".$currentusers.";maxusers=".$maxusers.";bytessend=".$bytesup.";bytesreceived=".$bytesdown.";uptime=".$uptime;
	if ($maxusers > 0) {
		$userpercent = ($currentusers * 100.0) / $maxusers;
	} else {
		print ("ERROR: Unable to get maxclients from $opt_t\n");
		exit $ERRORS{"UNKNOWN"};
	}
	if ($userpercent >= $ucrit) {
		print "CRITICAL: current users: $currentusers on server: $opt_t ; queryduration: ".$duration." | ".$perfdata."\n";
		exit $ERRORS{"CRITICAL"};
	} elsif ($userpercent >= $uwarn) {
		print "WARNING: current users: $currentusers on server: $opt_t ; queryduration: ".$duration." | ".$perfdata."\n";
		exit $ERRORS{"WARNING"};
	} else {
		print "OK: current users: $currentusers on server: $opt_t ; queryduration: ".$duration." | ".$perfdata."\n";
		exit $ERRORS{"OK"};
	}
}

sub print_usage () {
	print "Usage: $PROGNAME [-V] -H <host> [-t <telnet port>] [-s <server instance>] [-u <user> -p <password>] [-w <warn>] [-c <crit>] [-l]\n";
}

sub print_help () {
	print_revision($PROGNAME, $VERSION);
	print_usage();
	print "
Checks the Teamspeak 3 server on host H:t where
 -V, --version
   Print version information
 -h, --help
   Print detailed help screen
 -l, --list
   list running TS Servers on -H <Host>
 -H, --hostname=ADDRESS
   Host name argument
 -t, --telnetport=INTEGER
   Port number of telnet port (default: 10011)
 -u, --user=STRING
   A user name
 -s, --sid=INTEGER
   Server instance ID
 -p, --password=STRING
   The users password
 -w, --warning=FLOAT
   Usercount warning percent (default: 70)
 -c, --critical=FLOAT
   Usercount critical percent (default: 90)
";
	support();
}
Image

User avatar
Meso
Whee!
Posts: 1213
Joined: Mon Feb 16, 2009 1:02 pm

Re: so guess servers are down?

Post by Meso » Wed Nov 07, 2018 4:47 pm

Well maybe some link to DOJ and bandwidth issues with Sessions resignation. Hah, everyone mail him a joint. I bet he'd smoke it now.

User avatar
Glauri
Whee!
Posts: 2348
Joined: Fri May 29, 2009 7:15 am
Location: TEXAS!

Re: so guess servers are down?

Post by Glauri » Wed Nov 07, 2018 4:53 pm

Our server went from "down" to "locked". Whatever...
Do not regret growing older. It is a privilege denied to many.
Glauri

User avatar
Littlabit
Meanie
Posts: 3501
Joined: Tue Feb 27, 2007 6:01 pm
Location: TN
Contact:

Re: so guess servers are down?

Post by Littlabit » Wed Nov 07, 2018 4:56 pm

Thanks thott!
Littlabit D'might 110 Cleric
GL of Celestial Navigators (Mushroom follower)
"Life is too short for drama & petty things, so kiss slowly, laugh insanely, love truly and forgive quickly"

User avatar
Littlabit
Meanie
Posts: 3501
Joined: Tue Feb 27, 2007 6:01 pm
Location: TN
Contact:

Re: so guess servers are down?

Post by Littlabit » Wed Nov 07, 2018 4:57 pm

6:57 and still can not get on.. I'm pretty sure to say the raid is called :) Just in case you were wondering

EDIT: NO RAID
Littlabit D'might 110 Cleric
GL of Celestial Navigators (Mushroom follower)
"Life is too short for drama & petty things, so kiss slowly, laugh insanely, love truly and forgive quickly"

User avatar
Moonshaadow
Whee!
Posts: 22
Joined: Wed Jun 15, 2016 3:55 pm

Re: so guess servers are down?

Post by Moonshaadow » Wed Nov 07, 2018 5:00 pm

Woot! Finally got me avatar here!

User avatar
Girrin
Whee!
Posts: 64
Joined: Thu Aug 11, 2005 8:53 pm

Re: so guess servers are down?

Post by Girrin » Wed Nov 07, 2018 5:01 pm

They are coming back up now

User avatar
Andreii
Whee!
Posts: 57
Joined: Wed Nov 05, 2014 4:44 pm
Location: Neriak
Contact:

Re: so guess servers are down?

Post by Andreii » Wed Nov 07, 2018 5:03 pm

Servers are now showing as "up" on the server status page, and Endered and Viirus are both logging in.

--Endered

User avatar
Tandt
Fallen Jedi
Posts: 956
Joined: Tue Feb 27, 2007 7:38 pm
Location: Usually staring at corpse, waiting on a res

Re: so guess servers are down?

Post by Tandt » Wed Nov 07, 2018 5:06 pm

cant get to server select.
Image
Tandt Dmight
110 Warrior
:rr:
Its not big hair, Its my Helmet!

Boss mobs dont kill people, Clerics kill people!!

Harrington66
Whee!
Posts: 60
Joined: Wed Jun 24, 2015 7:25 pm

Re: so guess servers are down?

Post by Harrington66 » Wed Nov 07, 2018 5:09 pm

I just tried. No joy. Its 5:07, and I am going into withdrawal.

User avatar
oneyedranger
Whee!
Posts: 1095
Joined: Wed Jun 04, 2008 1:41 am
Location: In your mind creating those bad bad thoughts

Re: so guess servers are down?

Post by oneyedranger » Wed Nov 07, 2018 5:10 pm

everyone is logging on now

User avatar
Littlabit
Meanie
Posts: 3501
Joined: Tue Feb 27, 2007 6:01 pm
Location: TN
Contact:

Re: so guess servers are down?

Post by Littlabit » Wed Nov 07, 2018 5:14 pm

Everyone is logging in with a LOCK server? NM now it says up!
Littlabit D'might 110 Cleric
GL of Celestial Navigators (Mushroom follower)
"Life is too short for drama & petty things, so kiss slowly, laugh insanely, love truly and forgive quickly"

User avatar
Tandt
Fallen Jedi
Posts: 956
Joined: Tue Feb 27, 2007 7:38 pm
Location: Usually staring at corpse, waiting on a res

Re: so guess servers are down?

Post by Tandt » Wed Nov 07, 2018 5:15 pm

no joy 4 me
Image
Tandt Dmight
110 Warrior
:rr:
Its not big hair, Its my Helmet!

Boss mobs dont kill people, Clerics kill people!!

Post Reply