Google Docs: Share Outside My Organization (solved)

If you’re facing the problem with Google Docs where the “Users can share documents outside this domain” option doesn’t work, or the following issues, see the solution below on how to fix this.

These are the problems reported by others about Share Google Docs Outside Your Organization:

When I’m in the sharing settings in the document there is NO option to share out of organization. I disabled the option “Users can share documents outside this domain” several time ago and now, I reactivated it in order to share documents with users outside my domain.

When I want to share any document with people outside the domain I am not able to get the option to do that.

  • When viewing document share options, I can’t see the toolbar where I am asked to allow people outside the domain to view or edit the document.
  • When I try to get a public link to the document, I only have the option to get it for people inside the domain.

Control panel options are set properly but no change is performed in Google Docs.

  • I have another google apps domain account where I’m able to do that. In that account I’ve never disabled the share with people outside the domain.
  • I suspect the problem comes when you disable public sharing for the very first time and then you want to reactivate it again.

I don’t have the option ‘Users can publish documents to the public internet’ available.

  • I have multiple Google Domains, to compare. It I can’t find a way out of this problem.
  • In my other domains I have the ‘Users can publish documents to the public internet’ option available. But the domain I initially disabled sharing I don’t have the option at this point…

So it seems that once the option ‘Users cannot share documents outside this domain’ has been set there is no way back.

How Google Docs Allows you to Share Documents

Google offers the following levels of sharing

Public on the web

Anyone on the Internet can find and access. No sign-in required.

Anyone with the link

Anyone who has the link can access. No sign-in required.

My Organization

People at My Organization can find and access.

People at My Organization with the link

People at My Organization who have the link can access.

Private

Only people explicitly granted permission can access. Sign-in required.

Users can share documents outside this domain

How to Fix Google Docs and allow “Share Outside My Organization”

The top two options, “Public on the web” and “Anyone with the link” are only available if you have the preference set for “Users can share documents outside this domain”

You can change that preference in your Google Apps control panel, choose Settings, then Docs, then Users can share documents outside this domain.

Fixing Google Docs: Share Outside My Organization

However the key here, the “gotcha”, is that after changing this setting you may have to wait up to 6 hours for this to take effect. See the note from Google Support via email:

Hello,

Thank you for your message. I understand you are experiencing an issue when sharing documents outside your organization.

Please ensure you have the checked ‘Users can share documents outside this organization’ checked in the Document settings section of your control panel. Be advised that changes to these settings can take up to six hours to take effect in your account.

Once this time has passed, click on the blue Share button at the top right of the document in question. Clicking on the text ‘Change…’ under ‘Who has access’ and you should have the options ‘Anyone with the link’ and ‘Public on the web’ in order to share this document outside of your organization.

If your issue persists, and you have waited the appropriate time after making changes in the control panel, please reply to this message with the following screenshots:

  • The Docs settings in the control panel showing that you have allowed sharing outside the organization.
  • The visibility options, showing that ‘Public on the web’ and ‘Anyone with the link’ are not available options.

If you have any other related queries you can include them in your response and I’ll be happy to assist you further. I look forward to hearing from you.

Sincerely,

Enterprise Support

Posted in Security, Software, Web Development | Tagged , , , , , , , | Leave a comment

knife create syntax (man page)

I was trying to launch an instance of Chef with the “knife create” command that chef’s knife provides. The documentation page gives this example for how to launch a web server on Amazon’s EC2 server, but without much explanation of the terms:

knife ec2 server create -r "role[webserver]" -I ami-2d4aa444 --flavor m1.small -G www,default -x ubuntu -N server01

After doing some searching I just ended up digging into the code and found this information quite helpful, and so I am sharing it:

-f FLAVOR ( or --flavor FLAVOR )
    The flavor of server (m1.small, m1.medium, etc)
    default: m1.small

-I IMAGE ( or --image IMAGE )
    The AMI for the server

-G X,Y,Z ( or --groups X,Y,Z )
    The security groups for this server
    default: "default"

-Z ZONE ( or --availability-zone ZONE )
    The Availability Zone
    default: us-east-1b

-N NAME ( or --node-name NAME )
    The Chef node name for your new node

-S KEY ( or --ssh-key KEY )
    The AWS SSH key id

-x USERNAME ( or --ssh-user USERNAME )
    The ssh username
    default: root

-P PASSWORD ( or --ssh-password PASSWORD )
    The ssh password

-i IDENTITY_FILE ( or --identity-file IDENTITY_FILE )
    The SSH identity file used for authentication

--prerelease
    Install the pre-release chef gems

--bootstrap-version VERSION
    The version of Chef to install

-d DISTRO ( or --distro DISTRO )
    Bootstrap a distro using a template
    default: ubuntu10.04-gems

--template-file TEMPLATE
    Full path to location of template to use


--ebs-size SIZE
    The size of the EBS volume in GB, for EBS-backed instances

--ebs-no-delete-on-term
    Do not delete EBS volume on instance termination

-r RUN_LIST ( or --run-list RUN_LIST )
    Comma separated list of roles/recipes to apply


-s SUBNET-ID ( or --subnet SUBNET-ID )
    create node in this Virtual Private Cloud Subnet ID (implies VPC mode)


--no-host-key-verify
    Disable host key verification


--user-data USER_DATA_FILE (or -u USER_DATA_FILE )
    The EC2 User Data file to provision the instance with

There is also the knife --help command:

Usage: knife sub-command (options)
    -s, --server-url URL             Chef Server URL
    -k, --key KEY                    API Client Key
        --color                      Use colored output
    -c, --config CONFIG              The configuration file to use
        --defaults                   Accept default values for all questions
    -e, --editor EDITOR              Set the editor to use for interactive commands
    -E, --environment ENVIRONMENT    Set the Chef environment
    -F, --format FORMAT              Which format to use for output
        --no-color                   Don\'t use colors in the output
    -n, --no-editor                  Do not open EDITOR, just accept the data as is
    -u, --user USER                  API Client Username
        --print-after                Show the data after a destructive operation
    -V, --verbose                    More verbose output. Use twice for max verbosity
    -v, --version                    Show chef version
    -y, --yes                        Say yes to all prompts for confirmation
    -h, --help                       Show this message

Available subcommands: (for details, knife SUB-COMMAND --help)

** BOOTSTRAP COMMANDS **
knife bootstrap FQDN (options)

** CLIENT COMMANDS **
knife client list (options)
knife client reregister CLIENT (options)
knife client edit CLIENT (options)
knife client bulk delete REGEX (options)
knife client create CLIENT (options)
knife client show CLIENT (options)
knife client delete CLIENT (options)

** CONFIGURE COMMANDS **
knife configure client DIRECTORY
knife configure (options)

** COOKBOOK COMMANDS **
knife cookbook test [COOKBOOKS...] (options)
knife cookbook create COOKBOOK (options)
knife cookbook download COOKBOOK [VERSION] (options)
knife cookbook list (options)
knife cookbook delete COOKBOOK VERSION (options)
knife cookbook metadata from FILE (options)
knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options)
knife cookbook bulk delete REGEX (options)
knife cookbook metadata COOKBOOK (options)
knife cookbook upload [COOKBOOKS...] (options)

** COOKBOOK SITE COMMANDS **
knife cookbook site show COOKBOOK [VERSION] (options)
knife cookbook site share COOKBOOK CATEGORY (options)
knife cookbook site search QUERY (options)
knife cookbook site download COOKBOOK [VERSION] (options)
knife cookbook site list (options)
knife cookbook site unshare COOKBOOK
knife cookbook site install COOKBOOK [VERSION] (options)

** DATA BAG COMMANDS **
knife data bag show BAG [ITEM] (options)
knife data bag edit BAG ITEM (options)
knife data bag list (options)
knife data bag from file BAG FILE (options)
knife data bag create BAG [ITEM] (options)
knife data bag delete BAG [ITEM] (options)

** EC2 COMMANDS **
knife ec2 instance data (options)
knife ec2 server list (options)
knife ec2 server create (options)
knife ec2 server delete SERVER [SERVER] (options)

** ENVIRONMENT COMMANDS **
knife environment list (options)
knife environment show ENVIRONMENT (options)
knife environment edit ENVIRONMENT (options)
knife environment create ENVIRONMENT (options)
knife environment from file FILE (options)
knife environment delete ENVIRONMENT (options)

** EXEC COMMANDS **
knife exec [SCRIPT] (options)

** HELP COMMANDS **
knife help [list|TOPIC]

** INDEX COMMANDS **
knife index rebuild (options)

** NODE COMMANDS **
knife node from file FILE (options)
knife node create NODE (options)
knife node show NODE (options)
knife node edit NODE (options)
knife node delete NODE (options)
knife node list (options)
knife node run_list remove [NODE] [ENTRY] (options)
knife node run_list add [NODE] [ENTRY] (options)
knife node bulk delete REGEX (options)

** RECIPE COMMANDS **
knife recipe list [PATTERN]

** ROLE COMMANDS **
knife role from file FILE [FILE..] (options)
knife role show ROLE (options)
knife role edit ROLE (options)
knife role list (options)
knife role delete ROLE (options)
knife role create ROLE (options)
knife role bulk delete REGEX (options)

** SEARCH COMMANDS **
knife search INDEX QUERY (options)

** SSH COMMANDS **
knife ssh QUERY COMMAND (options)

** STATUS COMMANDS **
knife status QUERY (options)

** TAG COMMANDS **
knife tag list NODE
knife tag delete NODE TAG ...
knife tag create NODE TAG ...

And also the knife create --help command:

knife ec2 server create (options)
    -Z, --availability-zone ZONE     The Availability Zone
    -A, --aws-access-key-id KEY      Your AWS Access Key ID
    -K SECRET                        Your AWS API Secret Access Key
        --aws-secret-access-key
        --user-data USER_DATA_FILE   The EC2 User Data file to provision the instance with
        --bootstrap-version VERSION  The version of Chef to install
    -N, --node-name NAME             The Chef node name for your new node
        --server-url URL             Chef Server URL
    -k, --key KEY                    API Client Key
        --color                      Use colored output
    -c, --config CONFIG              The configuration file to use
        --defaults                   Accept default values for all questions
    -d, --distro DISTRO              Bootstrap a distro using a template
        --ebs-no-delete-on-term      Do not delete EBS volumn on instance termination
        --ebs-size SIZE              The size of the EBS volume in GB, for EBS-backed instances
    -e, --editor EDITOR              Set the editor to use for interactive commands
    -E, --environment ENVIRONMENT    Set the Chef environment
    -f, --flavor FLAVOR              The flavor of server (m1.small, m1.medium, etc)
    -F, --format FORMAT              Which format to use for output
    -i IDENTITY_FILE                 The SSH identity file used for authentication
        --identity-file
    -I, --image IMAGE                The AMI for the server
        --no-color                   Don\'t use colors in the output
    -n, --no-editor                  Do not open EDITOR, just accept the data as is
        --no-host-key-verify         Disable host key verification
    -u, --user USER                  API Client Username
        --prerelease                 Install the pre-release chef gems
        --print-after                Show the data after a destructive operation
        --region REGION              Your AWS region
    -r, --run-list RUN_LIST          Comma separated list of roles/recipes to apply
    -G, --groups X,Y,Z               The security groups for this server
    -S, --ssh-key KEY                The AWS SSH key id
    -P, --ssh-password PASSWORD      The ssh password
    -x, --ssh-user USERNAME          The ssh username
    -s, --subnet SUBNET-ID           create node in this Virtual Private Cloud Subnet ID (implies VPC mode)
        --template-file TEMPLATE     Full path to location of template to use
    -V, --verbose                    More verbose output. Use twice for max verbosity
    -v, --version                    Show chef version
    -y, --yes                        Say yes to all prompts for confirmation
    -h, --help                       Show this message

Hope these will be helpful.

These are some of the terms I was trying to use to find information about the syntax of the knife create (ec2) manual / page.

  • knife flavor group
  • knife ec2
  • knife ec2 g group
  • knife ec2 g group man
  • knife ec2 server flavor g n x
  • knife ec2 server flavor g n x
  • knife ec2 server flavor g n x man

Posted in Linux, Server Admin | Tagged , , , , , , | Leave a comment

jQuery: Change Doctype

There are a few things you might want to know if you’re looking to change the document type (doctype) using jQuery or Javascript. First, doctype is listed as a property in the W3C documentation, and is defined as read-only:

interface Document : Node {
  readonly attribute DocumentType     doctype;
  readonly attribute DOMImplementation  implementation;
  readonly attribute Element          documentElement;
  Element            createElement(in DOMString tagName)
                                        raises(DOMException);
  DocumentFragment   createDocumentFragment();

While it may be possible to insert a doctype with javascript / jquery above the HTML tag, it is not advisable to do so. Sample code which would do this might look like:

<!-- no doctype, loads in Quirks Mode (BackCompat) -->
<html>
    <!-- rest of the document, then at the end: -->

    <script>
        alert('now in compatMode '+document.compatMode);
        if (document.compatMode==='BackCompat') {
            setTimeout(function() {
                var markup= document.documentElement.innerHTML;
                markup= '< !DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">'+markup+'</html>';
                document.open();
                document.write(markup);
                document.close();
            }, 0);
        }
    </script>
</html>

via

Posted in Tech Tips, Web Development | Tagged , , , , , , | Leave a comment

Amazon EC2 Alternatives

Amazon EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.

Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.

Terremark

Terremark brings the power of the cloud to the enterprise with solutions built to integrate seamlessly into your existing I.T. infrastructure, compatible with your existing applications, and conforming to your policies and compliance needs, helping you move faster, respond quicker, and accelerate innovation. Terremark’s Enterprise Cloud gives you precise, dynamic allocation of computing resources with the scale, performance and security to handle enterprise-wide applications. Large organizations, IT executives and multi-site teams will appreciate the robust solution for its multi-user capacity, dedicated resource pool architecture and role-based security model as well as private network connectivity and physical device integration.

Eucalyptus

Eucalyptus is the world’s most widely deployed cloud computing software platform for on-premise (private) Infrastructure as a Service clouds. It uses existing infrastructure to create scalable and secure AWS-compatible cloud resources for compute, network and storage.

Slicehost / Rackspace

Create Cloud Virtual Servers in minutes and pay per usage. Get a Windows or Linux Cloud Server with root access. 1 to 50 servers in minutes. Choose a server size and pay for what you use. Accessible via online control panel and open API. Easily Control Your DNS. Fully customizable with root access. Fanatical Support always included. No long-term contracts, pay for what you use. Up to 30 GB servers.

DuraCloud

DuraCloud makes it easy to store and do more in the cloud. Our service makes the preservation of your content simple and cost effective. DuraCloud is the only service that makes it easy to move copies of your content into the cloud and store them with several different providers, all with just one click. We eliminate the risk of storing content with a single cloud provider by making it easy to move and copy files of any shape or size.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Statcounter: Add Existing Project to Group

If you can’t find the option to move my existing projects to a group:

  • Click on ‘Organise Projects’ beneath your list of Projects
  • Then type new group name in the “Move to Group” box and tick the projects you want to include
  • Press submit

How to Add your Project to an Existing Group (screenshots)

Statcounter- Add Existing Project to Group

Note: you’ll need at least 4 projects to be able to view and use this feature.

Posted in Marketing, Tech Tips, Web Development | Tagged , , , , | Leave a comment

How to Monitor Canon Printers with SNMP

I’m working to set up monitoring of Canon printers with SNMP, and I’m having a hard time finding resources around the internet on how to go about doing this, so this article will be collecting the resources I’ve found and putting them in once place.

Commands for Monitoring Canon Printers with SNMP

One of the problems that I had to look into was monitoring of CANON printers, and properly modifying Nagios config files for that: Once you understand a little how NAGIOS works you will understand what I am trying to show you here in example:

in /usr/local/nagios/etc/objects/commands.cfg I added a command:


define command{
          command_name check_snmp_canon
          command_line $USER1$/check_snmp -H $HOSTADDRESS$ -l STATUS -C public $ARG1$ $ARG2$
          }

then in: /usr/local/nagios/etc/objects/printer.cfg you define host and service like this:

define host{
          use          generic-printer
          host_name    SOMECANONPRINTER
          alias        SOMECANONPRINTER Alias
          address      "IP of the printer goes here"
          hostgroups   network-printers
          }

define service{
          use                   generic-service
          host_name             SOMECANONPRINTER
          service_description   Printer Status
          check_command         check_snmp_canon!-o hrDeviceStatus.1 -r "2|3"
          normal_check_interval   10
          retry_check_interval  1
          }

via http://mariuszgal.com/blog/?p=93


Some of the commands I’ve tried to execute directly from the command line use something like this:

/usr/lib/nagios/plugins/check_snmp -H 192.168.0.105 -C public -o hrDeviceStatus.1 

snmpwalk -v <snmp version, typically '2c'> -c <community string> <agent address, e.g. '192.168.3.141'> 1.3.6.1

snmpwalk -v 2c -c public 192.168.0.104

What is SNMP

Simple Network Management Protocol (SNMP) is a set of standards for managing network devices, network devices are monitored by a SNMP manager which connects to an SNMP agent on network devices. Data which the SNMP agent can access is stored in a database called Management Information Base (MIB), MIBs are sometimes called MIB trees and small pieces of information (variables) are stored on MIB leaves.

A community string is a password for accessing the SNMP agent and separate community strings are usually used for systems which require read only or read/write access.

There are 4 version of SNMP;

  • SNMPv1 – Basic authentication through the use of community strings using SMIv1, the community string is sent in plain text
  • SNMPv2 – Does not community strings to authenticate. Mandates the use of SMIv2 and allows the use of a new message GetBulk and Inform
  • SNMPv2c – Uses SNMP version 1 style community strings sent in plain text but operates more similarly to to SNMPv2
  • SNMPv3 – Similar to SNMPv2 but improvements made for security and access control.

There aren’t that many SNMP message types and its useful to know them all, the SNMP message types are;

  • Get – Requests a single single variable from a MIB
  • GetNext – Requests the next MIB leaf in the MIB tree
  • GetBulk – Requests a sequential list of MIB leaves in a single request, GetBulk is commonly used to extract complex MIB structures
  • Set – this message changes the value of a MIB variable
  • Response – Sent in response to a set, get or inform type messages
  • Trap – This message is sent in an unsolicited fashion and does not require confirmation
  • Inform – Sent between SNMP managers to inform each other about MIB data

via http://communitystring.com/2009/06/snmp-community-strings/


monitor all HP Laserjet printers using nagios’ check_hpjd

On Thu, Jul 23, 2009 at 11:35 AM, SYS ADMIN wrote:

I have managed to monitor all my HP Laserjet printers using checkhpjd. I have several networked Canon copier/printers on my LAN, and can’t seem to get any response back from them, although snmp is installed, and I try checksnmp. Does anyone have any experience/idea what to do? I can’t seem to even find OIDs for Canons.

Make sure you are using the correct SNMP community string .. if you use an incorrect community string with an SNMP agent, you will not get an error back from the agent, just a timeout.

Did you check the vendor’s web site for MIBs? That is my first step when I am asked to monitor a device for which I have no local MIBs to look at.

Once you have a valid community string, you can do an SNMP walk on the device to see what OIDs it supports .. e.g. with the Net-SNMP CLI utilities

snmpwalk -v <snmp version, typically '2c'> -c <community string> <agent address, e.g. '192.168.3.141'> 1.3.6.1

that will walk the entire OID tree of the agent. Some agents won’t walk the enterprise OID tree with that, so you might have to do a separate walk to get the enterprise OID tree output from the agent

snmpwalk -v <snmp version, typically '2c'> -c <community string> 192.168.3.1 1.3.6.1.4.1

Other good resources to search for MIBs are the obvious one (Google) or mibdepot.com

  • Max

via http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg28182.html


Keywords I used to find information about Monitoring Canon Printers with Nagios

Keywords I used when I was searching for how to do this:

  • Canon iR nagios
  • canon snmp nagios example
  • canon snmp oid -
  • check_hpjd | Nagios Plugins
  • check_snmp -H 192.168.0.15 -C public -o 1.3.6.1.2.1.43.11
  • community snmp agent community snmp sysad
  • define command check_snmp canon
  • ir 3035 oid smnp
  • monitoring – How can I set up Nagios to Monitor a Canon iR 3035? -
  • canon check_snmp public
  • nagios canon check_snmp public
  • nagios canon snmp oid
  • nagios monitor canon imagerunner paper

Canon Environment Setup

This section describes how to set up the environment for communication between the machine and computers on your network. If you are configuring the settings for the first time, use the control panel of the machine.

The machine supports the SNMP v. 1 and SNMP v. 3 management functions. You can use them simultaneously. The [Read Only]/[Read/Write] functions of SNMP v. 1 and the security functions of SNMP v. 3, such as an encrypted communication path, enable you to manage devices more securely. The available combinations of SNMP v. 1 and SNMP v. 3 functions you can use are shown below:

canon-nagios-snmp.png

If you want to specify a Community Name 1 Press [Community Name 1 Settings] ? [On] ? specify the settings for and the community name in [Community Name].

How to Monitor Canon Printers with SNMP

You can also change the community name in [Community Name] to a name other than ‘public’.

via http://www.tcnj.edu/~helpdesk/documents/Canon%20eManuals/Canon%20BW%20eManual/imageRUNNER3245Manualus/contents/nw_007/func.html

How can I set up Nagios to Monitor a Canon iR 3035?

Canon ImageRunner printers support SNMP(v1, “public” community by default) to query their status. They report through the standard printers MIB (.1.3.6.1.43, available here) as well as a proprietary Canon MIB (available through Canon, with a developer membership).

You can also implement screen-scraping from the web interface, but SNMP would be easier (and less likely to change if you change printers in the future).

via http://serverfault.com/questions/352801/how-can-i-set-up-nagios-to-monitor-a-canon-ir-3035/

Nagios Plugin Check SNMP

Usage:
check_snmp -H <ip_address> -o <oid> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-x privproto] [-X privpasswd]

Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -H, --hostname=ADDRESS
    Host name, IP Address, or unix socket (must be an absolute path)
 -p, --port=INTEGER
    Port number (default: 161)
 -n, --next
    Use SNMP GETNEXT instead of SNMP GET
 -P, --protocol=[1|2c|3]
    SNMP protocol version
 -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]
    SNMPv3 securityLevel
 -a, --authproto=[MD5|SHA]
    SNMPv3 auth proto
 -x, --privproto=[DES|AES]
    SNMPv3 priv proto (default DES)
 -C, --community=STRING
    Optional community string for SNMP communication (default is "public")
 -U, --secname=USERNAME
    SNMPv3 username
 -A, --authpassword=PASSWORD
    SNMPv3 authentication password
 -X, --privpasswd=PASSWORD
    SNMPv3 privacy password
 -o, --oid=OID(s)
    Object identifier(s) or SNMP variables whose value you wish to query
 -m, --miblist=STRING
    List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL'
    for symbolic OIDs.)
 -d, --delimiter=STRING
    Delimiter to use when parsing returned data. Default is "="
    Any data on the right hand side of the delimiter is considered
    to be the data that should be used in the evaluation.
 -w, --warning=THRESHOLD(s)
    Warning threshold range(s)
 -c, --critical=THRESHOLD(s)
    Critical threshold range(s)
 --rate
    Enable rate calculation. See 'Rate Calculation' below
 --rate-multiplier
    Converts rate per second. For example, set to 60 to convert to per minute
 -s, --string=STRING
    Return OK state (for that OID) if STRING is an exact match
 -r, --ereg=REGEX
    Return OK state (for that OID) if extended regular expression REGEX matches
 -R, --eregi=REGEX
    Return OK state (for that OID) if case-insensitive extended REGEX matches
 --invert-search
    Invert search result (CRITICAL if found)
 -l, --label=STRING
    Prefix label for output from plugin
 -u, --units=STRING
    Units label(s) for output data (e.g., 'sec.').
 -D, --output-delimiter=STRING
    Separates output on multiple OID requests
 -t, --timeout=INTEGER
    Seconds before connection times out (default: 10)
 -e, --retries=INTEGER
    Number of retries to be used in the requests
 -v, --verbose
    Show details for command-line debugging (Nagios may truncate output)

via http://nagiosplugins.org/man/check_snmp

Posted in Linux, Server Administration, Tech Tips | Tagged , , , , , , , , , | Leave a comment

Google Search Lucky

Google’s “I’m Feeling Lucky” search in Google Chrome

Do you want to use Google’s “I’m Feeling Lucky” search in Google Chrome? It’s easy using the custom search engines.

In Google Chrome click the wrench icon and then choose prferences Google Search Lucky

next click manage custom search engines

Inser the string(s) below and a name (pretty much irrelevant) and they shortcut keyword you want to use. I use >

Google Search Lucky Strings

Standard “Im Feeling Lucky” Search

http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky

SSL Encrypted “Im Feeling Lucky” Search

https://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky

Note: I’ve stripped out all items such as encoding and referrer to keep this as clean and simple as it can be.

Now you can simply type in something like > Google Docs into your browser bar and have it go to the first result – which is most likely the right place.

Posted in Mac, Software, Tech Tips, Web Development | Tagged , , , , , , , , , , | Leave a comment

Make YSlow work with Firefox 9.0

YSlow won’t work with Fire Fox 9 because it requires Firebug to work. And the latest versions of Firebug, 1.8, 1.9, and 1.10, do not work with YSlow. Until Yahoo gets around to updating their plugin, use this method to make YSlow work with your Firefox.

You may want to backup your profile before doing this – instructions are provided at the end of the posting.

Type in about:config into your address bar. After accepting the “this is dangerous” message right click and create a new entry. Make sure it is a BOOL.

yslow on firefox 9

Set the name to:

extensions.checkCompatibility.9.0

and then set the value to false

yslow not working on ff9

Now visit http://getfirebug.com/releases/firebug/1.7X/ and click on the latest version of Firebug 1.7, which I believe is firebug-1.7X.0b4.xpi

I’m assuming that you already have YSlow installed – but if you don’t then install it too.

Restart Firefox. Voila! Now your YSlow is working again! Feel free to leave a comment to thank me or suggest any tips or tricks related to YSlow and Firefox :)

Firebug and YSlow - firefox

You can either keep using Firebug 1.7 but if it’s really bothering you go ahead and reinstall the latest Firebug and then create a separate profile to use with YSlow.

See Mozilla’s notes on using separate profiles: http://kb.mozillazine.org/Profile_manager

Posted in Mac, Software, Tech Tips, Web Development | Tagged , , , , , , , | Leave a comment

Setting Nagios host check frequency and Nagios default check interval

With nagios (nagios3), the normal check interval is set to 5 minutes, and the retry is set to 1 minute. If your services are not that critical, you can increase the default check interval, perhaps from five minutes (or 600 seconds) to something like 10 minutes or 15 minutes.

Look for a file like generic-service_nagios.cfg in your configuration directory, possibly:

/etc/nagios3/conf.d/generic-service_nagios2.cfg

Then you can find the corresponding lines to make the edits you need:

define service{                                         
        name                            generic-service 
        active_checks_enabled           1               
        passive_checks_enabled          1               
        parallelize_check               1               
        obsess_over_service             1               
        check_freshness                 0               
        notifications_enabled           1               
        event_handler_enabled           1               
        flap_detection_enabled          1               
        failure_prediction_enabled      1               
        process_perf_data               1               
        retain_status_information       1               
        retain_nonstatus_information    1               
                notification_interval   0               
                is_volatile             0               
                check_period            24x7            
                normal_check_interval   5              
                retry_check_interval    1               
                max_check_attempts      4               
                notification_period     24x7            
                notification_options    w,u,c,r         
                contact_groups          admins          
        register                        0               
}
Posted in Software, Web Development | Tagged , , , , , | Leave a comment