Giter Site home page Giter Site logo

sweet's Introduction

Network device configuration backups and change alerts for the 21st century - inspired by RANCID!

See: http://gosweet.org

##Features:

  • Stores device configs in Git
  • Simple configuration file
  • Single binary - only runtime dependency is Git
  • Email notifications
  • Built-in web status dashboard
  • Embedded Cisco IOS/ASA and Juniper JunOS support
  • Supports external collection scripts (such as clogin, jlogin, etc.)
  • Currently supports Linux and OSX

##Quickstart:

[router1.example.com]
method = cisco
user = sweetuser
pass = SecretPW4sweet

##Usage:

  sweet [options] <config>
  sweet -h --help
  sweet --version

Options:
  -w, --workspace <dir>     Specify workspace directory [default: ./workspace].
  -i, --interval <secs>     Collection interval in secs [default: 300].
  -c, --concurrency <num>   Concurrent device collections [default: 30].
  -t, --to <email@addr>     Send change notifications to this email.
  -f, --from <email@addr>   Send change notifications from this email.
  -s, --smtp <host:port>    SMTP server connection info [default: localhost:25].
  --insecure                Accept untrusted SSH device keys.
  --push                    Do a "git push" after committing changed configs.
  --syslog                  Send log messages to syslog rather than stdout.
  --timeout <secs>          Device collection timeout in secs [default: 60].
  --web                     Run an HTTP status server.
  --weblisten <host:port>   Host and port to use for HTTP status server [default: localhost:5000].
  --version                 Show version.
  -h, --help                Show this screen.

##Authors:

##Contributors:

sweet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sweet's Issues

Uptime causes commit spam

Uptime is causing commit spam for the -version files.

My environment:
Sweet 1.3 monitoring Cisco 3560 switches (C3560-IPBASEK9-M), Version 12.2(55)SE10

Repo:

  1. Install Sweet 1.3
  2. Configure sweet to monitor a Cisco switch
  3. Wait long enough for Sweet to run an initial collection and a refresh
  4. Observe Sweet reports changes for the uptime line under show version. This is displayed both in the git history and console output.

small changes create large diffs

Small ASA config, removed one ACL of 4 lines, diff of +733 lines -4 lines

I can't post the config here, but I could provide a sanitized config out of band

ntp clock-period causes commit spam

Changes to "ntp clock-period" are causing commit spam to -config files. This value changing indicates local to ntp deltas and can safely be ignored by Sweet's collectors.

My environment:
Sweet 1.3 monitoring Cisco 3560 switches (C3560-IPBASEK9-M), Version 12.2(55)SE10

Zombie SSH Processes

For some reason sweet is not closing the connection completely with ssh:

root      3622  0.0  0.1  74524  5956 pts/0    Sl   Apr22   0:04  |       \_ sweet -w /srv/www/configs/ --push --syslog --insecure sweet.conf
root      3625  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      3628  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      3630  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      3952  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      3953  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      3954  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4254  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4255  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4256  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4277  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4278  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4279  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4354  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4355  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4356  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4608  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4609  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      4610  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5359  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5360  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5361  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5494  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5495  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5496  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5894  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5895  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5896  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5964  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5965  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5966  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5996  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5997  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      5998  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6232  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6233  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6234  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6988  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6989  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      6990  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7011  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7012  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7013  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7336  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7337  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7338  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7418  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7419  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7420  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7450  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7451  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7452  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7732  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7733  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      7734  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8480  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8481  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8482  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8503  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8504  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8505  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8738  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8739  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8740  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8878  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8879  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      8880  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9064  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9065  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9066  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9331  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9332  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root      9333  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10092  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10093  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10094  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10187  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10188  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10189  0.0  0.0      0     0 ?        Zs   Apr22   0:00  |       |   \_ [ssh] <defunct>
root     10514  0.0  0.0      0     0 ?        Zs   00:03   0:00  |       |   \_ [ssh] <defunct>
root     10515  0.0  0.0      0     0 ?        Zs   00:03   0:00  |       |   \_ [ssh] <defunct>
root     10516  0.0  0.0      0     0 ?        Zs   00:03   0:00  |       |   \_ [ssh] <defunct>
root     10615  0.0  0.0      0     0 ?        Zs   00:08   0:00  |       |   \_ [ssh] <defunct>
root     10616  0.0  0.0      0     0 ?        Zs   00:08   0:00  |       |   \_ [ssh] <defunct>
root     10617  0.0  0.0      0     0 ?        Zs   00:08   0:00  |       |   \_ [ssh] <defunct>
root     10717  0.0  0.0      0     0 ?        Zs   00:13   0:00  |       |   \_ [ssh] <defunct>
root     10718  0.0  0.0      0     0 ?        Zs   00:13   0:00  |       |   \_ [ssh] <defunct>
root     10719  0.0  0.0      0     0 ?        Zs   00:13   0:00  |       |   \_ [ssh] <defunct>
root     11023  0.0  0.0      0     0 ?        Zs   00:18   0:00  |       |   \_ [ssh] <defunct>
root     11024  0.0  0.0      0     0 ?        Zs   00:18   0:00  |       |   \_ [ssh] <defunct>
root     11025  0.0  0.0      0     0 ?        Zs   00:18   0:00  |       |   \_ [ssh] <defunct>
root     11833  0.0  0.0      0     0 ?        Zs   00:23   0:00  |       |   \_ [ssh] <defunct>
root     11834  0.0  0.0      0     0 ?        Zs   00:23   0:00  |       |   \_ [ssh] <defunct>
root     11835  0.0  0.0      0     0 ?        Zs   00:23   0:00  |       |   \_ [ssh] <defunct>
root     11926  0.0  0.0      0     0 ?        Zs   00:28   0:00  |       |   \_ [ssh] <defunct>
root     11927  0.0  0.0      0     0 ?        Zs   00:28   0:00  |       |   \_ [ssh] <defunct>
root     11928  0.0  0.0      0     0 ?        Zs   00:28   0:00  |       |   \_ [ssh] <defunct>
root     12318  0.0  0.0      0     0 ?        Zs   00:33   0:00  |       |   \_ [ssh] <defunct>
root     12319  0.0  0.0      0     0 ?        Zs   00:33   0:00  |       |   \_ [ssh] <defunct>
root     12320  0.0  0.0      0     0 ?        Zs   00:33   0:00  |       |   \_ [ssh] <defunct>
root     12466  0.0  0.0      0     0 ?        Zs   00:38   0:00  |       |   \_ [ssh] <defunct>
root     12467  0.0  0.0      0     0 ?        Zs   00:38   0:00  |       |   \_ [ssh] <defunct>
root     12468  0.0  0.0      0     0 ?        Zs   00:38   0:00  |       |   \_ [ssh] <defunct>
root     12564  0.0  0.0      0     0 ?        Zs   00:43   0:00  |       |   \_ [ssh] <defunct>
root     12565  0.0  0.0      0     0 ?        Zs   00:43   0:00  |       |   \_ [ssh] <defunct>
root     12566  0.0  0.0      0     0 ?        Zs   00:43   0:00  |       |   \_ [ssh] <defunct>
root     12865  0.0  0.0      0     0 ?        Zs   00:48   0:00  |       |   \_ [ssh] <defunct>
root     12866  0.0  0.0      0     0 ?        Zs   00:48   0:00  |       |   \_ [ssh] <defunct>
root     12867  0.0  0.0      0     0 ?        Zs   00:48   0:00  |       |   \_ [ssh] <defunct>
root     13657  0.0  0.0      0     0 ?        Zs   00:54   0:00  |       |   \_ [ssh] <defunct>
root     13658  0.0  0.0      0     0 ?        Zs   00:54   0:00  |       |   \_ [ssh] <defunct>
root     13659  0.0  0.0      0     0 ?        Zs   00:54   0:00  |       |   \_ [ssh] <defunct>
root     13681  0.0  0.0      0     0 ?        Zs   00:59   0:00  |       |   \_ [ssh] <defunct>
root     13682  0.0  0.0      0     0 ?        Zs   00:59   0:00  |       |   \_ [ssh] <defunct>
root     13683  0.0  0.0      0     0 ?        Zs   00:59   0:00  |       |   \_ [ssh] <defunct>
root     13938  0.0  0.0      0     0 ?        Zs   01:04   0:00  |       |   \_ [ssh] <defunct>
root     13939  0.0  0.0      0     0 ?        Zs   01:04   0:00  |       |   \_ [ssh] <defunct>
root     13940  0.0  0.0      0     0 ?        Zs   01:04   0:00  |       |   \_ [ssh] <defunct>
root     14119  0.0  0.0      0     0 ?        Zs   01:09   0:00  |       |   \_ [ssh] <defunct>
root     14120  0.0  0.0      0     0 ?        Zs   01:09   0:00  |       |   \_ [ssh] <defunct>
root     14121  0.0  0.0      0     0 ?        Zs   01:09   0:00  |       |   \_ [ssh] <defunct>
root     14209  0.0  0.0      0     0 ?        Zs   01:14   0:00  |       |   \_ [ssh] <defunct>
root     14210  0.0  0.0      0     0 ?        Zs   01:14   0:00  |       |   \_ [ssh] <defunct>
root     14211  0.0  0.0      0     0 ?        Zs   01:14   0:00  |       |   \_ [ssh] <defunct>
root     14455  0.0  0.0      0     0 ?        Zs   01:19   0:00  |       |   \_ [ssh] <defunct>
root     14456  0.0  0.0      0     0 ?        Zs   01:19   0:00  |       |   \_ [ssh] <defunct>
root     14457  0.0  0.0      0     0 ?        Zs   01:19   0:00  |       |   \_ [ssh] <defunct>
root     15205  0.0  0.0      0     0 ?        Zs   01:24   0:00  |       |   \_ [ssh] <defunct>
root     15206  0.0  0.0      0     0 ?        Zs   01:24   0:00  |       |   \_ [ssh] <defunct>
root     15207  0.0  0.0      0     0 ?        Zs   01:24   0:00  |       |   \_ [ssh] <defunct>
root     15285  0.0  0.0      0     0 ?        Zs   01:29   0:00  |       |   \_ [ssh] <defunct>
root     15286  0.0  0.0      0     0 ?        Zs   01:29   0:00  |       |   \_ [ssh] <defunct>
root     15287  0.0  0.0      0     0 ?        Zs   01:29   0:00  |       |   \_ [ssh] <defunct>
root     15518  0.0  0.0      0     0 ?        Zs   01:34   0:00  |       |   \_ [ssh] <defunct>
root     15519  0.0  0.0      0     0 ?        Zs   01:34   0:00  |       |   \_ [ssh] <defunct>
root     15520  0.0  0.0      0     0 ?        Zs   01:34   0:00  |       |   \_ [ssh] <defunct>
root     15588  0.0  0.0      0     0 ?        Zs   01:39   0:00  |       |   \_ [ssh] <defunct>
root     15589  0.0  0.0      0     0 ?        Zs   01:39   0:00  |       |   \_ [ssh] <defunct>
root     15590  0.0  0.0      0     0 ?        Zs   01:39   0:00  |       |   \_ [ssh] <defunct>
root     15707  0.0  0.0      0     0 ?        Zs   01:44   0:00  |       |   \_ [ssh] <defunct>
root     15708  0.0  0.0      0     0 ?        Zs   01:44   0:00  |       |   \_ [ssh] <defunct>
root     15709  0.0  0.0      0     0 ?        Zs   01:44   0:00  |       |   \_ [ssh] <defunct>
root     16183  0.0  0.0      0     0 ?        Zs   01:49   0:00  |       |   \_ [ssh] <defunct>
root     16184  0.0  0.0      0     0 ?        Zs   01:49   0:00  |       |   \_ [ssh] <defunct>
root     16185  0.0  0.0      0     0 ?        Zs   01:49   0:00  |       |   \_ [ssh] <defunct>
root     16742  0.0  0.0      0     0 ?        Zs   01:54   0:00  |       |   \_ [ssh] <defunct>
root     16743  0.0  0.0      0     0 ?        Zs   01:54   0:00  |       |   \_ [ssh] <defunct>
root     16744  0.0  0.0      0     0 ?        Zs   01:54   0:00  |       |   \_ [ssh] <defunct>
root     16765  0.0  0.0      0     0 ?        Zs   01:59   0:00  |       |   \_ [ssh] <defunct>
root     16766  0.0  0.0      0     0 ?        Zs   01:59   0:00  |       |   \_ [ssh] <defunct>
root     16767  0.0  0.0      0     0 ?        Zs   01:59   0:00  |       |   \_ [ssh] <defunct>
root     17060  0.0  0.0      0     0 ?        Zs   02:05   0:00  |       |   \_ [ssh] <defunct>
root     17061  0.0  0.0      0     0 ?        Zs   02:05   0:00  |       |   \_ [ssh] <defunct>
root     17062  0.0  0.0      0     0 ?        Zs   02:05   0:00  |       |   \_ [ssh] <defunct>
root     17094  0.0  0.0      0     0 ?        Zs   02:10   0:00  |       |   \_ [ssh] <defunct>
root     17095  0.0  0.0      0     0 ?        Zs   02:10   0:00  |       |   \_ [ssh] <defunct>
root     17096  0.0  0.0      0     0 ?        Zs   02:10   0:00  |       |   \_ [ssh] <defunct>
root     17330  0.0  0.0      0     0 ?        Zs   02:15   0:00  |       |   \_ [ssh] <defunct>
root     17331  0.0  0.0      0     0 ?        Zs   02:15   0:00  |       |   \_ [ssh] <defunct>
root     17332  0.0  0.0      0     0 ?        Zs   02:15   0:00  |       |   \_ [ssh] <defunct>
root     18219  0.0  0.0      0     0 ?        Zs   02:20   0:00  |       |   \_ [ssh] <defunct>
root     18220  0.0  0.0      0     0 ?        Zs   02:20   0:00  |       |   \_ [ssh] <defunct>
root     18221  0.0  0.0      0     0 ?        Zs   02:20   0:00  |       |   \_ [ssh] <defunct>
root     18383  0.0  0.0      0     0 ?        Zs   02:25   0:00  |       |   \_ [ssh] <defunct>
root     18384  0.0  0.0      0     0 ?        Zs   02:25   0:00  |       |   \_ [ssh] <defunct>
root     18385  0.0  0.0      0     0 ?        Zs   02:25   0:00  |       |   \_ [ssh] <defunct>
root     18669  0.0  0.0      0     0 ?        Zs   02:30   0:00  |       |   \_ [ssh] <defunct>
root     18670  0.0  0.0      0     0 ?        Zs   02:30   0:00  |       |   \_ [ssh] <defunct>
root     18671  0.0  0.0      0     0 ?        Zs   02:30   0:00  |       |   \_ [ssh] <defunct>
root     18727  0.0  0.0      0     0 ?        Zs   02:35   0:00  |       |   \_ [ssh] <defunct>
root     18728  0.0  0.0      0     0 ?        Zs   02:35   0:00  |       |   \_ [ssh] <defunct>
root     18729  0.0  0.0      0     0 ?        Zs   02:35   0:00  |       |   \_ [ssh] <defunct>
root     18767  0.0  0.0      0     0 ?        Zs   02:40   0:00  |       |   \_ [ssh] <defunct>
root     18768  0.0  0.0      0     0 ?        Zs   02:40   0:00  |       |   \_ [ssh] <defunct>
root     18769  0.0  0.0      0     0 ?        Zs   02:40   0:00  |       |   \_ [ssh] <defunct>
root     19004  0.0  0.0      0     0 ?        Zs   02:45   0:00  |       |   \_ [ssh] <defunct>
root     19005  0.0  0.0      0     0 ?        Zs   02:45   0:00  |       |   \_ [ssh] <defunct>
root     19006  0.0  0.0      0     0 ?        Zs   02:45   0:00  |       |   \_ [ssh] <defunct>
root     19801  0.0  0.0      0     0 ?        Zs   02:50   0:00  |       |   \_ [ssh] <defunct>
root     19802  0.0  0.0      0     0 ?        Zs   02:50   0:00  |       |   \_ [ssh] <defunct>
root     19803  0.0  0.0      0     0 ?        Zs   02:50   0:00  |       |   \_ [ssh] <defunct>
root     19913  0.0  0.0      0     0 ?        Zs   02:55   0:00  |       |   \_ [ssh] <defunct>
root     19914  0.0  0.0      0     0 ?        Zs   02:55   0:00  |       |   \_ [ssh] <defunct>
root     19915  0.0  0.0      0     0 ?        Zs   02:55   0:00  |       |   \_ [ssh] <defunct>
root     20166  0.0  0.0      0     0 ?        Zs   03:00   0:00  |       |   \_ [ssh] <defunct>
root     20167  0.0  0.0      0     0 ?        Zs   03:00   0:00  |       |   \_ [ssh] <defunct>
root     20168  0.0  0.0      0     0 ?        Zs   03:00   0:00  |       |   \_ [ssh] <defunct>
root     20189  0.0  0.0      0     0 ?        Zs   03:05   0:00  |       |   \_ [ssh] <defunct>
root     20190  0.0  0.0      0     0 ?        Zs   03:05   0:00  |       |   \_ [ssh] <defunct>
root     20191  0.0  0.0      0     0 ?        Zs   03:05   0:00  |       |   \_ [ssh] <defunct>
root     20224  0.0  0.0      0     0 ?        Zs   03:11   0:00  |       |   \_ [ssh] <defunct>
root     20225  0.0  0.0      0     0 ?        Zs   03:11   0:00  |       |   \_ [ssh] <defunct>
root     20226  0.0  0.0      0     0 ?        Zs   03:11   0:00  |       |   \_ [ssh] <defunct>
root     20489  0.0  0.0      0     0 ?        Zs   03:16   0:00  |       |   \_ [ssh] <defunct>
root     20490  0.0  0.0      0     0 ?        Zs   03:16   0:00  |       |   \_ [ssh] <defunct>
root     20491  0.0  0.0      0     0 ?        Zs   03:16   0:00  |       |   \_ [ssh] <defunct>
root     21257  0.0  0.0      0     0 ?        Zs   03:21   0:00  |       |   \_ [ssh] <defunct>
root     21258  0.0  0.0      0     0 ?        Zs   03:21   0:00  |       |   \_ [ssh] <defunct>
root     21259  0.0  0.0      0     0 ?        Zs   03:21   0:00  |       |   \_ [ssh] <defunct>
root     21335  0.0  0.0      0     0 ?        Zs   03:26   0:00  |       |   \_ [ssh] <defunct>
root     21336  0.0  0.0      0     0 ?        Zs   03:26   0:00  |       |   \_ [ssh] <defunct>
root     21337  0.0  0.0      0     0 ?        Zs   03:26   0:00  |       |   \_ [ssh] <defunct>
root     21649  0.0  0.0      0     0 ?        Zs   03:31   0:00  |       |   \_ [ssh] <defunct>
root     21650  0.0  0.0      0     0 ?        Zs   03:31   0:00  |       |   \_ [ssh] <defunct>
root     21651  0.0  0.0      0     0 ?        Zs   03:31   0:00  |       |   \_ [ssh] <defunct>
root     21672  0.0  0.0      0     0 ?        Zs   03:36   0:00  |       |   \_ [ssh] <defunct>
root     21673  0.0  0.0      0     0 ?        Zs   03:36   0:00  |       |   \_ [ssh] <defunct>
root     21674  0.0  0.0      0     0 ?        Zs   03:36   0:00  |       |   \_ [ssh] <defunct>
root     21704  0.0  0.0      0     0 ?        Zs   03:41   0:00  |       |   \_ [ssh] <defunct>
root     21705  0.0  0.0      0     0 ?        Zs   03:41   0:00  |       |   \_ [ssh] <defunct>
root     21706  0.0  0.0      0     0 ?        Zs   03:41   0:00  |       |   \_ [ssh] <defunct>
root     21942  0.0  0.0      0     0 ?        Zs   03:46   0:00  |       |   \_ [ssh] <defunct>
root     21943  0.0  0.0      0     0 ?        Zs   03:46   0:00  |       |   \_ [ssh] <defunct>
root     21944  0.0  0.0      0     0 ?        Zs   03:46   0:00  |       |   \_ [ssh] <defunct>
root     22691  0.0  0.0      0     0 ?        Zs   03:51   0:00  |       |   \_ [ssh] <defunct>
root     22692  0.0  0.0      0     0 ?        Zs   03:51   0:00  |       |   \_ [ssh] <defunct>
root     22693  0.0  0.0      0     0 ?        Zs   03:51   0:00  |       |   \_ [ssh] <defunct>
root     22738  0.0  0.0      0     0 ?        Zs   03:56   0:00  |       |   \_ [ssh] <defunct>
root     22739  0.0  0.0      0     0 ?        Zs   03:56   0:00  |       |   \_ [ssh] <defunct>
root     22740  0.0  0.0      0     0 ?        Zs   03:56   0:00  |       |   \_ [ssh] <defunct>
root     23070  0.0  0.0      0     0 ?        Zs   04:01   0:00  |       |   \_ [ssh] <defunct>
root     23071  0.0  0.0      0     0 ?        Zs   04:01   0:00  |       |   \_ [ssh] <defunct>
root     23072  0.0  0.0      0     0 ?        Zs   04:01   0:00  |       |   \_ [ssh] <defunct>
root     23164  0.0  0.0      0     0 ?        Zs   04:06   0:00  |       |   \_ [ssh] <defunct>
root     23165  0.0  0.0      0     0 ?        Zs   04:06   0:00  |       |   \_ [ssh] <defunct>
root     23166  0.0  0.0      0     0 ?        Zs   04:06   0:00  |       |   \_ [ssh] <defunct>
root     23215  0.0  0.0      0     0 ?        Zs   04:11   0:00  |       |   \_ [ssh] <defunct>
root     23216  0.0  0.0      0     0 ?        Zs   04:11   0:00  |       |   \_ [ssh] <defunct>
root     23217  0.0  0.0      0     0 ?        Zs   04:11   0:00  |       |   \_ [ssh] <defunct>
root     23517  0.0  0.0      0     0 ?        Zs   04:16   0:00  |       |   \_ [ssh] <defunct>
root     23518  0.0  0.0      0     0 ?        Zs   04:16   0:00  |       |   \_ [ssh] <defunct>
root     23519  0.0  0.0      0     0 ?        Zs   04:16   0:00  |       |   \_ [ssh] <defunct>
root     24342  0.0  0.0      0     0 ?        Zs   04:22   0:00  |       |   \_ [ssh] <defunct>
root     24343  0.0  0.0      0     0 ?        Zs   04:22   0:00  |       |   \_ [ssh] <defunct>
root     24344  0.0  0.0      0     0 ?        Zs   04:22   0:00  |       |   \_ [ssh] <defunct>
root     24435  0.0  0.0      0     0 ?        Zs   04:27   0:00  |       |   \_ [ssh] <defunct>
root     24436  0.0  0.0      0     0 ?        Zs   04:27   0:00  |       |   \_ [ssh] <defunct>
root     24437  0.0  0.0      0     0 ?        Zs   04:27   0:00  |       |   \_ [ssh] <defunct>
root     24743  0.0  0.0      0     0 ?        Zs   04:32   0:00  |       |   \_ [ssh] <defunct>
root     24744  0.0  0.0      0     0 ?        Zs   04:32   0:00  |       |   \_ [ssh] <defunct>
root     24745  0.0  0.0      0     0 ?        Zs   04:32   0:00  |       |   \_ [ssh] <defunct>
root     24954  0.0  0.0      0     0 ?        Zs   04:37   0:00  |       |   \_ [ssh] <defunct>
root     24955  0.0  0.0      0     0 ?        Zs   04:37   0:00  |       |   \_ [ssh] <defunct>
root     24956  0.0  0.0      0     0 ?        Zs   04:37   0:00  |       |   \_ [ssh] <defunct>
root     25129  0.0  0.0      0     0 ?        Zs   04:42   0:00  |       |   \_ [ssh] <defunct>
root     25130  0.0  0.0      0     0 ?        Zs   04:42   0:00  |       |   \_ [ssh] <defunct>
root     25131  0.0  0.0      0     0 ?        Zs   04:42   0:00  |       |   \_ [ssh] <defunct>
root     25436  0.0  0.0      0     0 ?        Zs   04:47   0:00  |       |   \_ [ssh] <defunct>
root     25437  0.0  0.0      0     0 ?        Zs   04:47   0:00  |       |   \_ [ssh] <defunct>
root     25438  0.0  0.0      0     0 ?        Zs   04:47   0:00  |       |   \_ [ssh] <defunct>
root     26363  0.0  0.0      0     0 ?        Zs   04:52   0:00  |       |   \_ [ssh] <defunct>
root     26364  0.0  0.0      0     0 ?        Zs   04:52   0:00  |       |   \_ [ssh] <defunct>
root     26365  0.0  0.0      0     0 ?        Zs   04:52   0:00  |       |   \_ [ssh] <defunct>
root     26508  0.0  0.0      0     0 ?        Zs   04:57   0:00  |       |   \_ [ssh] <defunct>
root     26509  0.0  0.0      0     0 ?        Zs   04:57   0:00  |       |   \_ [ssh] <defunct>
root     26510  0.0  0.0      0     0 ?        Zs   04:57   0:00  |       |   \_ [ssh] <defunct>
root     26812  0.0  0.0      0     0 ?        Zs   05:02   0:00  |       |   \_ [ssh] <defunct>
root     26813  0.0  0.0      0     0 ?        Zs   05:02   0:00  |       |   \_ [ssh] <defunct>
root     26814  0.0  0.0      0     0 ?        Zs   05:02   0:00  |       |   \_ [ssh] <defunct>
root     26908  0.0  0.0      0     0 ?        Zs   05:07   0:00  |       |   \_ [ssh] <defunct>
root     26909  0.0  0.0      0     0 ?        Zs   05:07   0:00  |       |   \_ [ssh] <defunct>
root     26910  0.0  0.0      0     0 ?        Zs   05:07   0:00  |       |   \_ [ssh] <defunct>
root     27105  0.0  0.0      0     0 ?        Zs   05:12   0:00  |       |   \_ [ssh] <defunct>
root     27106  0.0  0.0      0     0 ?        Zs   05:12   0:00  |       |   \_ [ssh] <defunct>
root     27107  0.0  0.0      0     0 ?        Zs   05:12   0:00  |       |   \_ [ssh] <defunct>
root     27507  0.0  0.0      0     0 ?        Zs   05:17   0:00  |       |   \_ [ssh] <defunct>
root     27508  0.0  0.0      0     0 ?        Zs   05:17   0:00  |       |   \_ [ssh] <defunct>
root     27509  0.0  0.0      0     0 ?        Zs   05:17   0:00  |       |   \_ [ssh] <defunct>
root     28325  0.0  0.0      0     0 ?        Zs   05:22   0:00  |       |   \_ [ssh] <defunct>
root     28326  0.0  0.0      0     0 ?        Zs   05:22   0:00  |       |   \_ [ssh] <defunct>
root     28327  0.0  0.0      0     0 ?        Zs   05:22   0:00  |       |   \_ [ssh] <defunct>
root     28418  0.0  0.0      0     0 ?        Zs   05:27   0:00  |       |   \_ [ssh] <defunct>
root     28419  0.0  0.0      0     0 ?        Zs   05:27   0:00  |       |   \_ [ssh] <defunct>
root     28420  0.0  0.0      0     0 ?        Zs   05:27   0:00  |       |   \_ [ssh] <defunct>
root     28721  0.0  0.0      0     0 ?        Zs   05:33   0:00  |       |   \_ [ssh] <defunct>
root     28722  0.0  0.0      0     0 ?        Zs   05:33   0:00  |       |   \_ [ssh] <defunct>
root     28723  0.0  0.0      0     0 ?        Zs   05:33   0:00  |       |   \_ [ssh] <defunct>
root     28815  0.0  0.0      0     0 ?        Zs   05:38   0:00  |       |   \_ [ssh] <defunct>
root     28816  0.0  0.0      0     0 ?        Zs   05:38   0:00  |       |   \_ [ssh] <defunct>
root     28817  0.0  0.0      0     0 ?        Zs   05:38   0:00  |       |   \_ [ssh] <defunct>
root     28926  0.0  0.0      0     0 ?        Zs   05:43   0:00  |       |   \_ [ssh] <defunct>
root     28927  0.0  0.0      0     0 ?        Zs   05:43   0:00  |       |   \_ [ssh] <defunct>
root     28928  0.0  0.0      0     0 ?        Zs   05:43   0:00  |       |   \_ [ssh] <defunct>
root     29326  0.0  0.0      0     0 ?        Zs   05:48   0:00  |       |   \_ [ssh] <defunct>
root     29327  0.0  0.0      0     0 ?        Zs   05:48   0:00  |       |   \_ [ssh] <defunct>
root     29328  0.0  0.0      0     0 ?        Zs   05:48   0:00  |       |   \_ [ssh] <defunct>
root     30225  0.0  0.0      0     0 ?        Zs   05:53   0:00  |       |   \_ [ssh] <defunct>
root     30226  0.0  0.0      0     0 ?        Zs   05:53   0:00  |       |   \_ [ssh] <defunct>
root     30227  0.0  0.0      0     0 ?        Zs   05:53   0:00  |       |   \_ [ssh] <defunct>
root     30369  0.0  0.0      0     0 ?        Zs   05:58   0:00  |       |   \_ [ssh] <defunct>
root     30370  0.0  0.0      0     0 ?        Zs   05:58   0:00  |       |   \_ [ssh] <defunct>
root     30371  0.0  0.0      0     0 ?        Zs   05:58   0:00  |       |   \_ [ssh] <defunct>
root     30663  0.0  0.0      0     0 ?        Zs   06:03   0:00  |       |   \_ [ssh] <defunct>
root     30664  0.0  0.0      0     0 ?        Zs   06:03   0:00  |       |   \_ [ssh] <defunct>
root     30665  0.0  0.0      0     0 ?        Zs   06:03   0:00  |       |   \_ [ssh] <defunct>
root     30709  0.0  0.0      0     0 ?        Zs   06:08   0:00  |       |   \_ [ssh] <defunct>
root     30710  0.0  0.0      0     0 ?        Zs   06:08   0:00  |       |   \_ [ssh] <defunct>
root     30711  0.0  0.0      0     0 ?        Zs   06:08   0:00  |       |   \_ [ssh] <defunct>
root     30741  0.0  0.0      0     0 ?        Zs   06:13   0:00  |       |   \_ [ssh] <defunct>
root     30742  0.0  0.0      0     0 ?        Zs   06:13   0:00  |       |   \_ [ssh] <defunct>
root     30743  0.0  0.0      0     0 ?        Zs   06:13   0:00  |       |   \_ [ssh] <defunct>

Nothing in the logs to indicate that things did not go right just never closes the connection. If i let it go, it eventually kills its self as it runs out of open files. Rough time to get to that point is about 24 hours give or take. Let me know if there is anyway to help resolve this.

Add a "debug" flag

I'm trying to add Arista EOS support, and I'm having trouble because I'm not able to see the ssh output. It would be great if there was a debug flag that spit everything into a logfile or to stdout.

For instance, the devices I'm logging into give me the unhelpful error:

13:18:23 [mwalster@mwmbp:~/Code/gohome/src/github.com/dotwaffle/sweet/cmd] arista(+1/-1) ± go run main.go sweet.conf
2015/07/01 13:18:50 Starting 1 collectors. [concurrency=30]
2015/07/01 13:18:50 Waiting for 1 collectors.
2015/07/01 13:18:50 Starting collector: myswitch
2015/07/01 13:18:50 Started all 1 collectors.
2015/07/01 13:19:05 Finished collector: myswitch
2015/07/01 13:19:05 All 1 collectors finished.
2015/07/01 13:19:05 No changes to commit.
2015/07/01 13:19:05 Starting reporter.
2015/07/01 13:19:05 myswitch: error: collection timeout after 15 seconds

2015/07/01 13:19:05 Finished reporter.
^Cexit status 2

I'm struggling to debug it, I think it might be something to do with the handling of "enable" but without further data I can't continue.

Any pointers?

webserver access password

Thank you for this amazing project. I'm implementing sweet for backup and show config diff but i need to protect the webserver page with a password. How can I do?

thank you

telnet?

Any plans to add telnet support? We have some devices that don't support ssh. Looks like using rancid login scripts would work today, but just wondering.

runs, then exits with "exit status 128"

local@sweet-1:/usr/local/bin$ sudo ./sweet-linux-64 sweet.conf
2014/09/13 14:10:19 Starting 1 collectors. [concurrency=30]
2014/09/13 14:10:19 Waiting for 1 collectors.
2014/09/13 14:10:19 Starting web server on 0.0.0.0:5000
2014/09/13 14:10:29 Finished with all 1 collectors.
2014/09/13 14:10:29 exit status 128

Using Ubuntu 14.0.4 x64

if I catch the web service before it quite, I see

Device Last Collected Last Changed Status
f.q.d.n Never Never Config git log error for f.q.d.n

Trailing prompt on Cisco config pull

There is a trailing prompt on the last line of configs that are pulled down off my Cisco 3560 switches (I don't have other models to test).

My environment:
Sweet 1.3 monitoring Cisco 3560 switches (C3560-IPBASEK9-M), Version 12.2(55)SE10

Repo:

  1. Download Sweet 1.3
  2. Configure Sweet to monitor a Cisco switch
  3. Run Sweet
  4. Navigate to the Sweet working directory
  5. cat or tail the -config file for the switch
  6. Observe the trailing prompt

Cisco switches return no config

When connecting using method = cisco, my switches are not returning the full config. Instead they show:

show running-config
Building configuration...

This is consistent across multiple switches in multiple locations. I tried on 3560X, 3750 and 6509 switch models. I originally thought it was a timeout issue but the same output is observed at 60, 120 and 180 second timeouts. The first run reports "exit status 128" and subsequent runs show "No changes" indicating the same output is returned. Also some are using the default user/pass while others I have overwrote the default login credentials.

This is on the latest v1.2 release. Native Junos is working great, though!

Web interface wont start

Trying to start sweet on an ubuntu 14.04 box and while it will pull down the config from my first device, it never starts the web interface.

root@localhost:/usr/local/bin# ./sweet sweet.conf --web --weblisten 0.0.0.0:5000
2015/04/21 09:24:24 Starting 1 collectors. [concurrency=30]
2015/04/21 09:24:24 Waiting for 1 collectors.
2015/04/21 09:24:24 Starting collector: device1.local
2015/04/21 09:24:24 Started all 1 collectors.
2015/04/21 09:24:36 Saving result: device1.local config
2015/04/21 09:24:36 Saving result: device1.local version
2015/04/21 09:24:36 Finished collector: device1.local
2015/04/21 09:24:36 All 1 collectors finished.
2015/04/21 09:24:36 Committed changes to git.
2015/04/21 09:24:36 Starting reporter.
2015/04/21 09:24:36 device1.local: changes!
version: +5 -5

2015/04/21 09:24:36 Finished reporter.

Run an HTTP status server.

web = true

Host and port to use for HTTP status server (default: localhost:5000).

DANGER: Be careful if you expose this service - it contains your device configurations!

weblisten = 10.1.1.3:5000
timeout = 120

These global defaults are used if not specified in the device configuration below.

default-method = cisco
default-user = configuser
default-pass = configpass

[device.local]
method = cisco
ip = 10.1.1.4

Any thoughts? Using 1.3, tried both the .deb and the pre-compiled 64 bit version.

backups halfway if # in config

hi, say if descriptions are having # in them, then the config backup stops, i see that you are expecting # as the end of prompt, maybe we could change that \w# , of we could grab hostname first and then use that as end prompt?

"show conf" does not work with Cisco NX-OS

show conf

                                     ^
% Invalid command at '^' marker.

ankeny-b06-r18-network-n5k-1# 

Command should be "show running-config". This command should work on a wide variety of Cisco platforms...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.