Skip to content

Instantly share code, notes, and snippets.

View linuxprofessor's full-sized avatar

Marcus Wilhelmsson linuxprofessor

View GitHub Profile
@linuxprofessor
linuxprofessor / check_cpuload.sh
Created January 9, 2013 09:46
Check CPU load in SmartOS global zone
#!/bin/bash
#
# Check CPU load on SmartOS
# Copyright Marcus Wilhelmsson
# License: MIT
#
#Get args
while getopts "w:c:" OPTION; do
case "${OPTION}" in
@linuxprofessor
linuxprofessor / manifest.xml
Last active December 10, 2015 21:28
SMF manifest for NRPE in SmartOS GZ
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="nrpe">
<service name="pkgsrc/nrpe" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name="network" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/milestone/network:default" />
</dependency>
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
@linuxprofessor
linuxprofessor / check_smarttemp.js
Created January 17, 2013 10:40
check_smarttemp.js - Nagios plugin written for Node.js. Used to monitor the temperatures of harddrives in SmartOS
#!/usr/node/bin/node
/*
check_smarttemp.js - Nagios plugin for checking mean disk temperatures on SmartOS using smartmontools
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
@linuxprofessor
linuxprofessor / check_cpuload.php
Last active January 11, 2020 22:56
Updated check_cpuload.sh with individual core support plus a template for PNP4Nagios.
<?php
# template file pnp4nagios
# copyright Marcus Wilhelmsson
# license: MIT
# to be used with my check_cpuload.sh for SmartOS for generating graphs with pnp4nagios
# Define opt and def as empty
$opt[1] = '';
$def[1] = '';
#!/usr/bin/env bash
# Check free memory in SmartOS
# Regards the ARC as free memory
#
# Copyright Marcus Wilhelmsson
# License: MIT
#
# Get args
TEMP="getopt -o wch:"
{
"extractors": [
{
"condition_type": "none",
"condition_value": "",
"converters": [
{
"config": {},
"type": "numeric"
}