adejoux / nmon2influxdb

Make NMON data dynamic with InfluxDB
GNU Affero General Public License v3.0
80 stars 29 forks source link

nmon2influxdb from several HMC #72

Open niar68 opened 5 years ago

niar68 commented 5 years ago

We have several HMC's for some reason. Think this is an excellent script to import HMC data and then use Grafana to present it. But I wonder if there is a way to import HMC-data from several HMC's? How do I configure that in nmon2influxdb.cfg?

niar68 commented 5 years ago

Does anyone have any solution for getting hmc data from many HMC's?

thcfontes commented 5 years ago

Hi,

I have a script that I use to do the collection of several hmc, it also has a function to kill the trapped sessions that stay locked in the hmc after the collections.

################ crontab - schedule ########################## metrics_hmc_import.sh hmc_import.sh Server-9080-MHE-XXXXXXXXX hmc_import.sh Server-9080-MHE-XXXXXXXXX hmc_import.sh Server-9080-MME-XXXXXXXXX hmc_import.sh Server-9117-MMD-XXXXXXXXX hmc_import.sh Server-9119-MHE-XXXXXXXXX hmc_import.sh Server-9119-MHE-XXXXXXXXX hmc_import.sh Server-9119-MME-XXXXXXXXX hmc_import.sh Server-9119-MME-XXXXXXXXX hmc_import.sh Server-9119-MME-XXXXXXXXX hmc_import.sh Server-9119-MME-XXXXXXXXX

################ hmc_import.sh ########################## frame=$1

until /sbin/nmon2influxdb hmc import -m $frame; do if [$? -eq 0]; then sudo su - monitor -c "./kill_session_hmc.sh" break else /sbin/nmon2influxdb hmc import -m $frame fi sudo su - monitor -c "./kill_session_hmc.sh" done sudo su - monitor -c "./kill_session_hmc.sh"

################ kill_session_hmc.sh ##########################

!/bin/bash

LIST_SESSION=ssh hscroot@cpspsshmc01 "lslogon -r webui -u" | grep "Rest API" | awk -F , {'print $2'} | awk -F "session_id=" {'print $2'}

echo $LIST_SESSION for i in $LIST_SESSION do ssh hscroot@cpspsshmc01 "termtask -r webui -s $i -t all" done echo "All REST API Sessions has been killed" ssh hscroot@cpspsshmc01 "lslogon -r webui -u"

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jun 4, 2019 at 10:04 AM niar68 notifications@github.com wrote:

Does anyone have any solution for getting hmc data from many HMC's?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adejoux/nmon2influxdb/issues/72?email_source=notifications&email_token=ACGFRSE7NC2BHNMSSE4HWLLPYZR3XA5CNFSM4HGSORB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4PY3A#issuecomment-498662508, or mute the thread https://github.com/notifications/unsubscribe-auth/ACGFRSF7MT7LVVV64SB5SDTPYZR3XANCNFSM4HGSORBQ .

-- Thiago C. Fontes

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#m_755045327424278140_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

niar68 commented 5 years ago

Thanks, but I have a question about this. How do you manage .nmon2influxdb.cfg when you have several hmc's?

thcfontes commented 5 years ago

No, only any one:

hmc_server = "cpspsshmc01" hmc_user = "hscroot" hmc_password = "XXXXXX" hmc_database = "nmon2influxdbHMC" hmc_data_retention = "365d" hmc_managed_system = "" hmc_managed_system_only = true hmc_samples = 50

I have 2 hmc's here and each one of them sees all the frames.

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jun 4, 2019 at 10:52 AM niar68 notifications@github.com wrote:

Thanks, but I have a question about this. How do you manage .nmon2influxdb.cfg when you have several hmc's?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adejoux/nmon2influxdb/issues/72?email_source=notifications&email_token=ACGFRSCF4EMF5DZPWYBW5XTPYZXRBA5CNFSM4HGSORB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4UG7Q#issuecomment-498680702, or mute the thread https://github.com/notifications/unsubscribe-auth/ACGFRSFMMMUGJ7D4YLKLTO3PYZXRBANCNFSM4HGSORBQ .

-- Thiago C. Fontes

niar68 commented 5 years ago

OK, then I understand, we do the same(having 2 HMC's working as a pair). But this doesn't solve my issue. We have many pairs with different frames/HW and also differnet locations So the question is perhaps bad decreibed from my side. So my question is how to get it from many HMC's(HMC-pairs) with different frames/HW?

adejoux commented 5 years ago

Hello,

You can override .nmon2influxdb.cfg parameters by command line:

   nmon2influxdb hmc import --hmc hm2 ----hmcuser special1  --hmcpass secret1

I was away and it's complicated for me to access power systems currently but I will check if I can do something about the import of multiple hmc.

Regards,

Alain

niar68 commented 5 years ago

Hi, thanks a lot. I will try and use the command instead. Looking forward to see if you find a solution for importing mulitple hmc's