This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import unittest | |
def parse_natural(name, line_card_first=False): | |
res = re.split("(\d+)", name) | |
if line_card_first and len(res) > 3: | |
res = ["", res[1]] + res | |
# first and last element is always a string; alternate values are numbers | |
for i in range(1, len(res), 2): | |
res[i] = int(res[i]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
host="$1" | |
REALM="LOCAL.EXAMPLE.NET" | |
LCREALM="local.example.net" | |
TESTUSER="nagiostest" | |
BASENAME="cn=users,dc=local,dc=example,dc=net" | |
if [ "$host" = "" ]; then | |
echo "Missing hostname" | |
exit 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install as reports/missing-device-ports.py | |
# Run as: python3 manage.py runreport missing-device-ports | |
from extras.reports import Report | |
from dcim.models import Device | |
class MissingDevicePorts(Report): | |
description = "Find devices which are missing ports that are in the device type template" | |
def test_add_ports(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Usage: | |
# shellinaboxd -t -s '/:ubuntu:ubuntu:/home/ubuntu:/home/ubuntu/gns3-shellinabox.py' | |
# | |
# Browse to http://<yourhost>:4200/ to get a list of consoles; | |
# click on one of the URLs to connect to the console | |
import os, sys | |
import urllib.parse as parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Sat 2019-11-09 11:16:34 UTC, end at Sat 2019-11-09 12:01:02 UTC. -- | |
Nov 09 11:16:34 srv1 systemd-journald[354]: Runtime journal (/run/log/journal/) is 3.1M, max 25.0M, 21.9M free. | |
Nov 09 11:16:34 srv1 kernel: Initializing cgroup subsys cpuset | |
Nov 09 11:16:34 srv1 kernel: Initializing cgroup subsys cpu | |
Nov 09 11:16:34 srv1 kernel: Initializing cgroup subsys cpuacct | |
Nov 09 11:16:34 srv1 kernel: Linux version 4.4.0-166-generic (buildd@lcy01-amd64-020) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #195-Ubuntu SMP Tue Oct 1 09:35:25 UTC 2019 (Ubuntu 4.4.0-166.195-generic 4.4.194) | |
Nov 09 11:16:34 srv1 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-166-generic root=UUID=edfada70-3677-4ca5-b8d9-666cb1ce991f ro console=tty1 console=ttyS0 | |
Nov 09 11:16:34 srv1 kernel: KERNEL supported cpus: | |
Nov 09 11:16:34 srv1 kernel: Intel GenuineIntel | |
Nov 09 11:16:34 srv1 kernel: AMD AuthenticAMD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
● srv1 | |
State: degraded | |
Jobs: 0 queued | |
Failed: 1 units | |
Since: Sat 2019-11-09 09:51:11 UTC; 10min ago | |
CGroup: / | |
├─lxc | |
│ ├─host1 | |
│ │ ├─init.scope | |
│ │ │ └─2422 /sbin/init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Sat 2019-11-09 09:51:12 UTC, end at Sat 2019-11-09 10:01:46 UTC. -- | |
Nov 09 09:51:12 srv1 systemd-journald[343]: Runtime journal (/run/log/journal/) is 3.1M, max 25.0M, 21.9M free. | |
Nov 09 09:51:12 srv1 kernel: Initializing cgroup subsys cpuset | |
Nov 09 09:51:12 srv1 kernel: Initializing cgroup subsys cpu | |
Nov 09 09:51:12 srv1 kernel: Initializing cgroup subsys cpuacct | |
Nov 09 09:51:12 srv1 kernel: Linux version 4.4.0-166-generic (buildd@lcy01-amd64-020) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #195-Ubuntu SMP Tue Oct 1 09:35:25 UTC 2019 (Ubuntu 4.4.0-166.195-generic 4.4.194) | |
Nov 09 09:51:12 srv1 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-166-generic root=UUID=edfada70-3677-4ca5-b8d9-666cb1ce991f ro console=tty1 console=ttyS0 | |
Nov 09 09:51:12 srv1 kernel: KERNEL supported cpus: | |
Nov 09 09:51:12 srv1 kernel: Intel GenuineIntel | |
Nov 09 09:51:12 srv1 kernel: AMD AuthenticAMD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10:08:15.839630 IP 127.0.0.1.46040 > 127.0.0.1.8080: Flags [S], seq 683951199, win 43690, options [mss 65495,sackOK,TS val 1486321600 ecr 0,nop,wscale 7], length 0 | |
E..<"y@.@..A............(.D_.........0......... | |
X.w......... | |
10:08:15.839649 IP 127.0.0.1.8080 > 127.0.0.1.46040: Flags [S.], seq 1637026495, ack 683951200, win 43690, options [mss 65495,sackOK,TS val 1486321600 ecr 1486321600,nop,wscale 7], length 0 | |
E..<..@.@.<.............a. | |
.(.D`.....0......... | |
X.w.X.w..... | |
10:08:15.839666 IP 127.0.0.1.46040 > 127.0.0.1.8080: Flags [.], ack 1, win 342, options [nop,nop,TS val 1486321600 ecr 1486321600], length 0 | |
E..4"z@.@..H............(.D`a. | |
....V.(..... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10:44:30.754 [pulsar-web-57-6] INFO org.eclipse.jetty.server.RequestLog - 10.85.179.103 - - [13/Nov/2019:10:44:30 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 851 "-" "Pulsar-Java-v2.4.1" 2 | |
10:44:37.358 [io-write-scheduler-OrderedScheduler-1-0] INFO org.apache.bookkeeper.statelib.impl.kv.RocksdbKVStore - Checkpoint local state store 000000000000000001/000000000000001025/000000000000001024 at revision -1 | |
10:44:37.358 [io-checkpoint-scheduler-OrderedScheduler-1-0] INFO org.apache.bookkeeper.statelib.impl.rocksdb.checkpoint.RocksdbCheckpointTask - Create a local checkpoint of state store 000000000000000001/000000000000001025/000000000000001024 at /home/ubuntu/apache-pulsar-2.4.1/data/bookkeeper/ranges/ranges/000000000000000001/000000000000001025/000000000000001024/checkpoints/588b3bdb-a0f1-4248-b525-050b39aac65a | |
10:44:37.516 [main-EventThread] INFO org.apache.distributedlog.bk.SimpleLedgerAllocator - Ledger allocator for /stream/storage/000000000000000001/00000000000000102 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10:50:00.756 [pulsar-web-57-7] INFO org.eclipse.jetty.server.RequestLog - 10.85.179.103 - - [13/Nov/2019:10:50:00 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 851 "-" "Pulsar-Java-v2.4.1" 2 | |
10:50:30.755 [pulsar-web-57-6] INFO org.eclipse.jetty.server.RequestLog - 10.85.179.103 - - [13/Nov/2019:10:50:30 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 851 "-" "Pulsar-Java-v2.4.1" 3 | |
^CException in thread "Thread-5" java.lang.NullPointerException | |
at org.apache.pulsar.functions.runtime.ProcessRuntime.lambda$start$0(ProcessRuntime.java:138) | |
at java.lang.Thread.run(Thread.java:748) | |
Exception in thread "Thread-11" java.lang.NullPointerException | |
at org.apache.pulsar.functions.runtime.ProcessRuntime.lambda$start$0(ProcessRuntime.java:138) | |
at java.lang.Thread.run(Thread.java:748) | |
Exception in thread "Thread-7" java.lang.NullPointerException | |
at org.apache.pulsar.functions.runtime.ProcessRuntime.lambda$start$0(Pr |