fedorpatlin / sapccmsget

Utility to get performance data from SAP CCMS monitoring tree element by full name. Used by zabbix-agent.
GNU General Public License v3.0
10 stars 10 forks source link

Use #2

Open gesandovalr opened 6 years ago

gesandovalr commented 6 years ago

Hi Fedor,

I'm so sorry for contacting in your github, I understand this utility connects with CMMS Solman, I'm working on a Zabbix implementation and I saw this but I do not understand how to implement this or how even get the SAPSCCMSGET into zabbix.

Regards, German.

L1n0r commented 6 years ago

Hi,

I have the same doubt.

Can you help us?

Thanks

fedorpatlin commented 6 years ago

Hi, I had this tool on each SAP-host. Sapccmsget not connects to SOLMAN. It connects to each SAP instance and calls SOAP-service SAPCCMS.cgi.

Default values of command line parameters for sapccmsget is: -h = os.Hostname() (connection host) -s = "" (SAP system name) -n = "00" (SAP instance number) -e = "" (MTE full name)

Zabbix-agent has UserParameter configured to launch sapccmsget with defined SAPSID and MTENAME: UserParameter=sap.ccms.get[*],/usr/sbin/sapccmsget -s $1 -e $2

It connects to SAP instance and send SOAP-request MtGetTidByName.

I don't have access to any SAP system now but I did some tests. I launched netcat in server mode on port 50013 and started sapccmsget by command:

$sapccmsget -h 127.0.0.1 -n 00 -s NOT_NEEDED_HERE -e 'ERP\\saphostname_ERP_00\\R3Services\\Dialog\\ResponseTime'

Netcat prints me program request:

$ nc -l 127.0.0.1 50013
POST /SAPCCMS.cgi HTTP/1.1
Host: 127.0.0.1:50013
User-Agent: Go-http-client/1.1
Content-Length: 466
Content-Type: text/xml; charset=utf-8
Accept-Encoding: gzip

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_xmlns="xmlns" _xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <MtGetTidByName xmlns="urn:SAPCCMS">
      <CallingSID></CallingSID>
      <SegmentType></SegmentType>
      <SoapRequest>
        <item>
          <CompleteName>ERP\\saphostname_ERP_00\\R3Services\\Dialog\\ResponseTime</CompleteName>
        </item>
      </SoapRequest>
    </MtGetTidByName>
  </Body>
</Envelope>

You can check also availability of SOAP-service by HTTP-request to http://saphost:5[instanceNR]13/SAPCCMS.cgi?wsdl

I'm sorry I did not do more complete instructions. Thank you for using the program.

ortizleo commented 5 years ago

Hello, @fedorpatlin We need to compile main.go on AIX to work with sapccmsget? Can you help us to generate sapccmsget binary?

Thanks!

renatocarlosbarbosa commented 5 years ago

Hello, @fedorpatlin We need to compile main.go on AIX to work with sapccmsget? Can you help us to generate sapccmsget binary?

Thanks!

Alguma novidade a respeito? Conseguiu usar? Abs

fedorpatlin commented 5 years ago

Hello, @fedorpatlin We need to compile main.go on AIX to work with sapccmsget? Can you help us to generate sapccmsget binary?

Thanks!

You can build it for Linux, and deploy on any machine in network with access to your SAP system. Then connect to SAP by host and instance number.

emersonpfs commented 5 years ago

Hello @fedorpatlin I try to run sapccmsget -h 127.0.0.1 -n 00 -s -e 'ERP\saphostname_ERP_00\R3Services\Dialog\ResponseTime' but i get MtGetTidByName: RC=100 for element. Have any way to test by command line? how the application autenthicate on SAP? Thanks

fedorpatlin commented 5 years ago

Hi, Try to escape backslashes writing '\\' instead just one '\'. You can test it against netcat in server mode. Application not authenticate on SAP.

Franchesc0 commented 4 years ago

Hello @fedorpatlin I execute this line $ zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t "sap.ccms.get[ERP, 'ERP\host1_SID_00\R3Services\Dialog\ResponseTime'] "

I get sap.ccms.get[ERP, 'ERP\host1_SID_00\R3Services\Dialog\ResponseTime'] [t|47] What is t|47?

How to use keys in Zabbix to receive data?

fedorpatlin commented 4 years ago

What is t|47?

milliseconds

How to use keys in Zabbix to receive data?

In zabbix_agent.conf you configure the program: UserParameter=sap.ccms.get[*],/usr/sbin/sapccmsget -s $1 -e $2

$ 1 and $ 2 will be replaced with values obtained from Zabbix.

Franchesc0 commented 4 years ago

How to use keys in Zabbix to receive data?

In zabbix_agent.conf you configure the program: UserParameter=sap.ccms.get[*],/usr/sbin/sapccmsget -s $1 -e $2

$ 1 and $ 2 will be replaced with values obtained from Zabbix.

Oh. I registered static values in the configuration file. Ок

I replaced the line in the configuration file, now it looks like this: UserParameter=sap.ccms.get[*],/usr/sbin/sapccmsget -s $1 -e $2

After the changes, restarted the agent service and ran the command: zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t sap.ccms.get[ERP, 'ERP\host1_SID_00\R3Services\Dialog\ResponseTime']

Thank you! @fedorpatlin

wuseasky commented 2 years ago

Hello @fedorpatlin I execute the following HQSAPCRAL01D:crdadm 52> sapccmsget -h HQSAPCRAL01D -n 00 -s -e 'CRD\HQSAPCRAL01D_CRD_00\R3Services\Dialog\ResponseTime' 2022/05/27 10:22:56 Element not found by name Could you please how to fix it?

Thank you !

SystemWatchers commented 1 year ago

I am getting the same issue here and I hope someone can give us the right tip: `[root@devserver sapccmsget-master]# /usr/sbin/sapccmsget -s DEV -e DEV\devserver_DEV_00\R3Services\Dialog\ResponseTime 2023/04/15 14:28:44 Element not found by name DEVdevserver_DEV_00R3ServicesDialogResponseTime

[root@devserver sapccmsget-master]# /usr/sbin/sapccmsget -s DEV -e DEV\devserver_DEV_00\R3Services\Dialog\ResponseTime 2023/04/15 14:28:59 Element not found by name DEV\devserver_DEV_00\R3Services\Dialog\ResponseTime

[root@devserver sapccmsget-master]# /usr/sbin/sapccmsget -s DEV -e devserver_DEV_00\R3Services\Dialog\ResponseTime 2023/04/15 14:29:07 Element not found by name devserver_DEV_00\R3Services\Dialog\ResponseTime `

I am new to GO but I don't think it is code... Can someone kindly provide some support? Thank you!