Git Product home page Git Product logo

aerospike-admin's Introduction

Aerospike Admin

Description

Aerospike Admin provides an interface for Aerospike users to view the stat of their Aerospike Cluster by fetching information from a running cluster (Cluster mode) a collectinfo file (Collectinfo-Analyzer), or logs (Log-analyser mode). To get started run asadm and issue the help command. The full documentation can be found here.

Asinfo

The Aerospike Admin repo now contains asinfo. Asinfo has been a long time member of the Aerospike Tools package and is now built together with asadm. Asinfo provides a raw interface to Aerospike info protocol and is useful for debugging and development. The full documentation can be found here.

Build and Install Aerospike Admin

Runtime Dependencies

There are no runtime dependencies. This is because the python interpreter is now bundled with asadm version 2.6 and later.

Build Dependencies

  • python 3.10
  • pipenv

Build and Install Asadm

  1. Install python 3.10
  2. Install pipenv
  3. Initialize submodules git submodule update --init
  4. Build Asadm
    • There are two ways asadm can be bundled: one-file and one-dir. Both, are related to pyinstaller's two methods of bundling. The one-file build is great if you want a single executable artifact. The downside of one-file is that it must decompress into a /tmp directory in order to execute. This causes a number of problems. On macOS, the startup time is drastically increased because of the codesigning mechanism. The /tmp directory must be mounted with the the exec option. If the above scenarios describe your environment then use the one-dir build.
      • one-dir (default)
        make one-dir
        
      • one-file
        make one-file
        
  5. Install asadm
    sudo make install
    

Running Aerospike Admin in Live Cluster Mode.

asadm -h <Aerospike Server Address\>
Admin> help

Running Aerospike Admin in Log-analyser Mode.

asadm -l [-f <location of logs\>]
Admin> help

Running Aerospike Admin in Collectinfo Mode.

asadm -c [-f <location of collectinfo\>]
Admin> help

Tests

Asadm has unit, integration, and e2e tests. Tests also support code coverage reporting.

Dependencies

  • The e2e tests depend on docker.
  • The e2e tests depend on a aerospike features.conf file to run Aerospike Enterprise Edition.
  • Run pipenv install --dev.

Running Unit Tests

make unit

Running e2e/integration Tests

FEATKEY=(base64 -i path/to/features.conf) make integration

to test the bundled app run:

ASADM_TEST_BUNDLE=true FEATKEY=(base64 -i path/to/features.conf) make integration

Running all tests with coverage

FEATKEY=(base64 -i path/to/features.conf) make coverage

Profiling

Dependencies

  • yappi

Run Profiler

asadm --profile Do not exit with 'ctrl+c' exit with the exit command

aerospike-admin's People

Contributors

achorghade avatar ben-at-aerospike avatar bhuvanramk avatar citrusraj avatar dependabot[bot] avatar dwelch-spike avatar hbpatre avatar jdogmcsteezy avatar kportertx avatar marknaero avatar pavangupta01 avatar realmgic avatar robertglonek avatar sanjalinagare57 avatar spkesan avatar volmarl avatar wchu-citrusleaf avatar

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

Watchers

 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

aerospike-admin's Issues

asadm fails when HOME is not set.

With $HOME unset, asadm fails with the following error:

Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in run_module_as_main
"_main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in run_code
exec code in run_globals
File "/usr/bin/asadm/_main.py", line 20, in
File "/usr/bin/asadm/asadm.py", line 476, in main
File "/usr/lib64/python2.7/UserDict.py", line 23, in getitem
raise KeyError(key)
KeyError: 'HOME'

Fixed in #28.

Type error on info sindex

in case of a node down :

$ asadm
Aerospike Interactive Shell, version 0.0.13
Found 1 nodes
Offline: 127.0.0.1:3000

Admin> info sindex
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/asadm/__main__.py", line 20, in <module>
  File "/usr/bin/asadm/asadm.py", line 339, in main
  File "/usr/lib/python2.7/cmd.py", line 141, in cmdloop
    line = self.precmd(line)
  File "/usr/bin/asadm/asadm.py", line 108, in precmd
  File "/usr/bin/asadm/lib/controllerlib.py", line 176, in execute
  File "/usr/bin/asadm/lib/controllerlib.py", line 120, in __call__
  File "/usr/bin/asadm/lib/controllerlib.py", line 176, in execute
  File "/usr/bin/asadm/lib/controller.py", line 158, in do_sindex
TypeError: string indices must be integers, not str

the same if one node up :

$ asadm -h ...                                                                                                                                              
Aerospike Interactive Shell, version 0.0.13
Found 2 nodes
Online:  10.101.20.20:3000
Offline: 10.101.20.130:3000

Admin> info sindex
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
...

collectinfo _get_awsdata output

This relates to your internal ticket TOOL-924

In the collectinfo output do you want the value of every key on the metadata API or do you just specifically want the availability zone the instance is in?

Yesterday I rewrote the _get_metadata function that walks through the EC2 metadata API. It grabs every value from the API in a safer way than the current implementation (which gets hung up on the list of security group IDs infinitely). If you're interested in this code I would be happy to push it, but I want to clarify what the expectation of output is.

No "-v" option with asadm.py

From commit 60218cbf61b0ac4a75824e6f6c713d6415c5a842, when the health check is executed, it concludes with the line:

INFO: Please use -v option for more details on failure. 

But, passing "-v" throws an error saying:

asadm.py: error: unrecognized arguments: -v

The "-u" usage option also does not list the "-v" option.

JSON format data.

Hi team,
I want to get the time_to_live.
I can get the data from asadm -e 'show distribution time_to_live'.
But it returned the table format data.
I want to get JSON format data from the command.

Thank you very much!

asadm -e info creating too many tcp connections

Hey guys,

I've been trying to use asadm -e info output to monitor for HWM in a nagios check.
I've noticed that whenever asadm -e info is ran, it creates lots of TCP connections. The larger is the cluster, more TCP connections are used and put into TIME_WAIT afterwards. This creates an issue if the check is run every minute or so certain services not being able to create new tcp connections.

This is not really a bug (running checks less frequently solves the issue for me) but something that you might consider as an improvement.

asadm output to console without ansi color codes

For a daily report we mail asadm output to email (or log>>file).

However output include colors. (red for Disk used>50%, blue for summed lines)

Prefered solution: add option to disable special characters (colors) in asadm output

Is there any definitive way of finding out how much memory each bin for a record takes?

Hi guys,
I've been given a task which I am not quite sure what exactly will lead us to but we are still getting familiar with aerospike database and we would like to make some sort of predictions about how much hardware we will need for our operational aerospike database.

I've been asked to determine how much memory each bin in our records takes and I was wondering is there any easy way to do this without actually counting by hand each one of them? Also, the main reason to ask here is to ask if there is a better way of making predictions on how much hardware we will be needing?

Thanks in advance!

Please fix processing hash from filename for success to add log_file

I try using log-analyzer by following command.

$ file -i aerospike.log
aerospike.log: text/plain; charset=us-ascii
$ asadm -lf aerospike.log
Seed:        [('localhost', 3000, None)]
Config_file: /home/ubuntu/.aerospike/astools.conf, /etc/aerospike/astools.conf
Aerospike Log Analyzer Shell, version 2.4.0

ERROR: Unicode-objects must be encoded before hashing

I modified

# https://github.com/aerospike/aerospike-admin/blob/master/lib/log_analyzer/log_handler/log_handler.py#L471
file_key = "MD5_" + str(hashlib.md5(log_file).hexdigest())

to

file_key = "MD5_" + str(hashlib.md5(log_file.encode("utf-8")).hexdigest())

then succeeded it.

Could you fix this?
thank you.

asadm-deps/UNKNOWN: No such file or directory

I tried to install asadm but got this error. Any ideas?

$ git clone https://github.com/aerospike/aerospike-admin.git
$ cd aerospike-admin/
$ sudo ./asadm-deps/install.sh 
./asadm-deps/install.sh: line 50: cd: /home/ec2-user/simon/as/aerospike-admin/asadm-deps/UNKNOWN: No such file or directory

[aerospike-tools] aql missing dependency

aql requires libreadline7 package which is not listed as dependency:

Depends: libc6 (>= 2.7)

The latest version (7.0.0) claims to add Debian 11 support:

TOOLS-1865 - (PACKAGING) Remove support for Debian 8 and add support for Debian 11.

However Debian 11 is shipped with libreadline8

ldd /usr/bin/aql
        linux-vdso.so.1 (0x00007ffcde3dc000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f52ba599000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f52ba455000)
        libreadline.so.7 => not found
        libhistory.so.7 => not found
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f52ba44a000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f52ba444000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f52ba425000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52ba260000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f52baa7b000)

It should work fine on Debian 10.

PI Used total value not showing correctly

Hi,

Am using E-5.0.0.10 of Aerospike, when am seeing output of info command, the total value of PI Used shows zero, might be a logical error in code, please get it fixed in future releases.

Thanks

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.