Difference between revisions of "Main Page"

From Initech Technical Wiki
Jump to: navigation, search
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<amp/>
 
'''Welcome'''
 
'''Welcome'''
  
Welcome to the Initech Technical Wiki.  Here you'll find bits and pieces of useful stuff related to anything that I find interesting.  Everything you find here is free to use for whatever nefarious purposes you may have in mind but needless to say that i'm not responsible for anything that goes wrong.  If you need help with anything or just want to contact me then its best to email me at [mailto:tim@initech.co.nz tim@initech.co.nz]
+
Welcome to the Initech Technical Wiki.  Here you'll find bits and pieces of useful stuff related to anything that I find interesting or IP that i've developed.  Everything you find here is free to use for whatever nefarious purposes you may have in mind but needless to say that i'm not responsible for anything that goes wrong.  If you need help with anything or just want to contact me then its best to email me at [mailto:tim@initech.co.nz tim@initech.co.nz]
 +
 
 +
== Juniper Networks Stuff ==
 +
=== Linux Scripts ===
 +
==== [[juniper-config-to-set]] ====
 +
The purpose of this script is to take a juniper config and convert it to set commands.  This makes it easier to parse with scripts and paste snippets into other routers.
  
 
== Linux Stuff ==
 
== Linux Stuff ==
 
=== General ===
 
=== General ===
 
[[LVM Management]]
 
[[LVM Management]]
 +
 
=== Rancid ===
 
=== Rancid ===
 +
 +
==== [[custom fetchers and patches]] ====
 +
This is a library of custom config fetchers and patches to existing files
  
 
==== [[sync-cacti]] ====
 
==== [[sync-cacti]] ====
Line 15: Line 25:
  
 
==== [[bulk-update]] ====
 
==== [[bulk-update]] ====
 +
 +
==== Juniper related scripts ====
 +
===== [[juniper-set-rsvp-metrics]] =====
 +
This script assumes that you want to set your RSVP interface IGP metrics to the same as your bearer latency.  It automagically assesses the latency of each link and then recommends configuration changes if necessary.
 +
 +
=== nagios ===
 +
==== [[nagios_check_juniper_virtual_chassis]] ====
 +
 +
This custom nagios plugin checks to make sure that all Juniper virtual chassis members are present and running the same version.  You need to provide the hostname, SNMP community and number of expected virtual chassis members.
 +
 +
==== [[nagios_check_junos_psu_count]] ====
 +
 +
This custom nagios plugin checks to make sure that the the expected number of power supply units are installed and operating in the chassis.  There have been times when installed power supplies (in MX chassis) lose AC power but it doesn't alarm.  In unattended locations this could be disastrous.
 +
 +
This script takes three arguments:  Hostname, SNMP Community and expected PSU count.  It will warn if more PSUs than expected are installed and critical alarm if less than expected are found.  This script will also work for Juniper EX-series virtual chassis and the sum-total of installed PSUs in the whole virtual chassis is what you should use as the argument.
 +
 +
The script checks for PSUs installed and in state '2' according to the list below of valid states:
 +
 +
# Unknown
 +
# Up and running
 +
# Ready to run, not running yet
 +
# Held in reset, not ready yet
 +
# Running at Full Speed (valid for fans only)
 +
# Down or off (for power supply)
 +
# Running as a standby (Backup)
 +
 +
==== [[nagios_check_fortisandbox_queue]] ====
 +
 +
This script i wrote to check the processing queue lengths of FortiSandbox appliances.  Sometimes a FortiSandbox will stop processing jobs for no adequately explainable reason so i created this script to keep an eye on the job queues.
 +
 +
The script takes 6 arguments:  Hostname, SNMP Community, queue warning level, queue critical level, total jobs warning level and total jobs critical level.
 +
 +
For each queue below it will check to make sure that each one has less items than the 'queue warning level'.  At the end it totals all files in all queues and checks the total against the 'total jobs warning level'
 +
 +
'''Job Queues Checked'''
 +
 +
# .1.3.6.1.4.1.12356.118.5.1.1.0 = Executables/DLL/VBS/BAT/PS1/JAR/MSI queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.2.0 = PDF files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.3.0 = Office files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.4.0 = Flash files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.5.0 = Web files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.6.0 = Android files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.7.0 = Android files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.8.0 = URL job queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.9.0 = User defined files queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.10.0 = Non sandbox queue size
 +
# .1.3.6.1.4.1.12356.118.5.1.11.0 = Job Queue Assignment Pending
 +
 +
==== [[nagios_check_fortimail_queue]] ====
 +
 +
This script checks all the mail queues in a FortiMail system and for each one prints the name and the message count and warns or alarms depending on warning and critical levels specified.
 +
 +
The script takes the following arguments:  Hostname, SNMP Community, Queue warning level, Queue critical level
  
 
== [[Logstash]] ==
 
== [[Logstash]] ==
Line 22: Line 85:
  
 
[[Kibana dashboard modifications]]
 
[[Kibana dashboard modifications]]
 +
 +
== [[Clickhouse]] ==

Latest revision as of 02:21, 11 May 2023

Welcome

Welcome to the Initech Technical Wiki. Here you'll find bits and pieces of useful stuff related to anything that I find interesting or IP that i've developed. Everything you find here is free to use for whatever nefarious purposes you may have in mind but needless to say that i'm not responsible for anything that goes wrong. If you need help with anything or just want to contact me then its best to email me at tim@initech.co.nz

Juniper Networks Stuff

Linux Scripts

juniper-config-to-set

The purpose of this script is to take a juniper config and convert it to set commands. This makes it easier to parse with scripts and paste snippets into other routers.

Linux Stuff

General

LVM Management

Rancid

custom fetchers and patches

This is a library of custom config fetchers and patches to existing files

sync-cacti

Want a script which syncs your cacti hosts into rancid and your /etc/hosts file? This sync-cacti script may be for you (use it with caution).

con

For those of us who manage hundreds of devices via rancid its tricky to remember what they're called and which particular login binary to use to access them. I made my "con" script to automate this.

bulk-update

Juniper related scripts

juniper-set-rsvp-metrics

This script assumes that you want to set your RSVP interface IGP metrics to the same as your bearer latency. It automagically assesses the latency of each link and then recommends configuration changes if necessary.

nagios

nagios_check_juniper_virtual_chassis

This custom nagios plugin checks to make sure that all Juniper virtual chassis members are present and running the same version. You need to provide the hostname, SNMP community and number of expected virtual chassis members.

nagios_check_junos_psu_count

This custom nagios plugin checks to make sure that the the expected number of power supply units are installed and operating in the chassis. There have been times when installed power supplies (in MX chassis) lose AC power but it doesn't alarm. In unattended locations this could be disastrous.

This script takes three arguments: Hostname, SNMP Community and expected PSU count. It will warn if more PSUs than expected are installed and critical alarm if less than expected are found. This script will also work for Juniper EX-series virtual chassis and the sum-total of installed PSUs in the whole virtual chassis is what you should use as the argument.

The script checks for PSUs installed and in state '2' according to the list below of valid states:

  1. Unknown
  2. Up and running
  3. Ready to run, not running yet
  4. Held in reset, not ready yet
  5. Running at Full Speed (valid for fans only)
  6. Down or off (for power supply)
  7. Running as a standby (Backup)

nagios_check_fortisandbox_queue

This script i wrote to check the processing queue lengths of FortiSandbox appliances. Sometimes a FortiSandbox will stop processing jobs for no adequately explainable reason so i created this script to keep an eye on the job queues.

The script takes 6 arguments: Hostname, SNMP Community, queue warning level, queue critical level, total jobs warning level and total jobs critical level.

For each queue below it will check to make sure that each one has less items than the 'queue warning level'. At the end it totals all files in all queues and checks the total against the 'total jobs warning level'

Job Queues Checked

  1. .1.3.6.1.4.1.12356.118.5.1.1.0 = Executables/DLL/VBS/BAT/PS1/JAR/MSI queue size
  2. .1.3.6.1.4.1.12356.118.5.1.2.0 = PDF files queue size
  3. .1.3.6.1.4.1.12356.118.5.1.3.0 = Office files queue size
  4. .1.3.6.1.4.1.12356.118.5.1.4.0 = Flash files queue size
  5. .1.3.6.1.4.1.12356.118.5.1.5.0 = Web files queue size
  6. .1.3.6.1.4.1.12356.118.5.1.6.0 = Android files queue size
  7. .1.3.6.1.4.1.12356.118.5.1.7.0 = Android files queue size
  8. .1.3.6.1.4.1.12356.118.5.1.8.0 = URL job queue size
  9. .1.3.6.1.4.1.12356.118.5.1.9.0 = User defined files queue size
  10. .1.3.6.1.4.1.12356.118.5.1.10.0 = Non sandbox queue size
  11. .1.3.6.1.4.1.12356.118.5.1.11.0 = Job Queue Assignment Pending

nagios_check_fortimail_queue

This script checks all the mail queues in a FortiMail system and for each one prints the name and the message count and warns or alarms depending on warning and critical levels specified.

The script takes the following arguments: Hostname, SNMP Community, Queue warning level, Queue critical level

Logstash

Logstash

Logstash for IPFIX

Kibana dashboard modifications

Clickhouse