Fixing problems with the new v2 OpsGenie iOS app

The new version 2.x of the OpsGenie mobile app (iOS) is a sweet sweet upgrade for those coming from version 1.x. For most users who were not part of the beta program the upgrade should have happened seamlessly. For those of us that were, you may have had problems during the upgrade with the app throwing errors like “device push token cannot be empty”, and sound selection not working. To fix the problem, log out of both the beta and final versions of the apps. Uninstall the beta version then go to into Settings -> Notifications -> OpsGenie. Untick everything, go back a …

Fixing problems with the new v2 OpsGenie iOS app Read More »

Graphing Postfix with Cacti

[Updated 2015-03-09] There are a bunch of articles and information on this topic out there, but most of them either don’t work, are outdated, or are scattered across multiple pages on the Cacti forums. I’ve worked out the kinks for you, so here’s what you need to do to graph Postfix with Cacti.This was performed on Debian 6 with Cacti 0.8.7g from the apt repository but should work on other distros too.Note that this article tackles graphing the sent, received, rejected, bounced, spam, and virus statistics. It does not graph mail queues. You need two files, the first is mailgraph.pl which you’ll …

Graphing Postfix with Cacti Read More »

Fixing and removing corrupted Apache configs in Plesk

Today I ran into an interesting problem with Plesk. It had gotten it’s Apache configuration so messed up that when you ran httpdmng reconfigure for any domain, it would throw errors about not being able to find include files. For example: apache2: Syntax error on line 227 of /etc/apache2/apache2.conf: Syntax error on line 7 of /etc/apache2/conf.d/zz010_psa_httpd.conf: Syntax error on line 15 of /opt/psa/admin/conf/generated/14099869670.15839100_horde.include: Syntax error on line 56 of /opt/psa/admin/conf/webmail_horde_bootstrap.conf: Could not open configuration file /opt/psa/admin/conf/generated/14099802590.70236400_domain_com_webmail.include: No such file or directory The fix for this involves some MySQL work. Go into the “psa” database in MySQL. You’ll see a “Configuration” …

Fixing and removing corrupted Apache configs in Plesk Read More »

Iterators iterators iterators!

Managing lots of CloudFormation stacks can be a pain through the AWS Console. Stacks are paginated so you’ll need to keep clicking that “View more stacks” button until you get to the stack you want. Performing tasks through the AWS PHP SDK makes it a little easier, but you’ll still need to deal with tokens. Take the following code snippet for example: [code lang=php] $client = \Aws\CloudFormation\CloudFormationClient::factory($config); $stackstatus = array('CREATE_COMPLETE'); // First run $result = $client->listStacks(array( 'StackStatusFilter' => $stackstatus, )); $stacks = $result['StackSummaries']; $token = $result['NextToken']; foreach ($stacks as $stack) { echo "$stack[StackName] – $stack[StackStatus]\n"; } // Subsequent runs while ($token != …

Iterators iterators iterators! Read More »

Apache, Akamai, and True-Client-IP

You’re running a site behind Akamai, but can’t see the real client’s IP address, only that of your load balancer and/or Akamai’s IP addresses. Therefore you can’t act on it, ban IP’s….etc. Akamai does pass the true IP address of clients, but not through the standard X-Forwarded-For header. It uses one named True-Client-IP. Apache doesn’t understand True-Client-IP so it doesn’t pass this along internally to logging and other modules like PHP. There exists an Apache module named mod_remoteip which was introduced in Apache 2.4. A lot of sites don’t run Apache 2.4 yet as of the time of this article, …

Apache, Akamai, and True-Client-IP Read More »

Scroll to Top