summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_clibrary/VESreporting_vFW
diff options
context:
space:
mode:
authorPrakashH <pbhandar@techmahindra.com>2019-01-29 20:41:28 +0000
committerPrakashH <pbhandar@techmahindra.com>2019-02-13 19:00:02 +0000
commite987dff7d71bf2255646df58bf22fa603f8d3935 (patch)
tree11d55c61f49f9c2712c7b42a9ecd10e98659865d /veslibrary/ves_clibrary/VESreporting_vFW
parent493ed75799223784bdd6f9363d3bc4d189ddb370 (diff)
VES 7.1 C Lib/Agent Enhancements
HB-Fault-Measurement-Syslog-2Collector enhancement Issue-ID: VNFSDK-364 Change-Id: Iba5dc8b0493431a23de4fb8e24b6fc3a6661c4e4 Signed-off-by: PrakashH <pbhandar@techmahindra.com>
Diffstat (limited to 'veslibrary/ves_clibrary/VESreporting_vFW')
-rwxr-xr-xveslibrary/ves_clibrary/VESreporting_vFW/go-client.sh8
-rw-r--r--veslibrary/ves_clibrary/VESreporting_vFW/vpp_measurement_reporter.c26
2 files changed, 25 insertions, 9 deletions
diff --git a/veslibrary/ves_clibrary/VESreporting_vFW/go-client.sh b/veslibrary/ves_clibrary/VESreporting_vFW/go-client.sh
index b2b3a08..0aaed85 100755
--- a/veslibrary/ves_clibrary/VESreporting_vFW/go-client.sh
+++ b/veslibrary/ves_clibrary/VESreporting_vFW/go-client.sh
@@ -1,6 +1,12 @@
#!/bin/bash
-
export LD_LIBRARY_PATH="/opt/VES/evel/evel-library/libs/x86_64/"
+
+#Usage for 2 collectors:
+#./vpp_measurement_reporter <FQDN>|<IP address> <port> <FQDN>|<IP address> <port>
+# Usage for a collector:
+#./vpp_measurement_reporter <FQDN>|<IP address> <port>
+
DCAE_COLLECTOR_IP=$(cat /opt/config/dcae_collector_ip.txt)
DCAE_COLLECTOR_PORT=$(cat /opt/config/dcae_collector_port.txt)
./vpp_measurement_reporter $DCAE_COLLECTOR_IP $DCAE_COLLECTOR_PORT
+
diff --git a/veslibrary/ves_clibrary/VESreporting_vFW/vpp_measurement_reporter.c b/veslibrary/ves_clibrary/VESreporting_vFW/vpp_measurement_reporter.c
index 42f9793..0b1719e 100644
--- a/veslibrary/ves_clibrary/VESreporting_vFW/vpp_measurement_reporter.c
+++ b/veslibrary/ves_clibrary/VESreporting_vFW/vpp_measurement_reporter.c
@@ -15,6 +15,7 @@
*
****************************************************************************/
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -603,15 +604,25 @@ int main(int argc, char** argv)
{
char* fqdn = argv[1];
int port = atoi(argv[2]);
+ char* fqdn2 = NULL;
+ int port2 = 0;
int i=0;
int rc;
pthread_attr_t attr;
pthread_t hb_thread;
pthread_t meas_thread;
pthread_t flt_thread;
+
+ if(argc == 5)
+ {
+ fqdn2 = argv[3];
+ port2 = atoi(argv[4]);
+ }
- if (argc != 3)
+ if (!((argc == 3) || (argc == 5)))
{
+ fprintf(stderr, "Usage: %s <FQDN>|<IP address> <port> <FQDN>|<IP address> <port> \n", argv[0]);
+ fprintf(stderr, "OR\n");
fprintf(stderr, "Usage: %s <FQDN>|<IP address> <port> \n", argv[0]);
exit(-1);
}
@@ -621,23 +632,22 @@ int main(int argc, char** argv)
/**************************************************************************/
if(evel_initialize(fqdn, /* FQDN */
port, /* Port */
- NULL, /* Backup FQDN */
- 0, /* Backup port */
+ fqdn2, /* Backup FQDN */
+ port2, /* Backup port */
NULL, /* optional path */
NULL, /* optional topic */
100, /* Ring Buffer size */
0, /* HTTPS? */
- 0, /* active mode? */
NULL, /* cert file */
NULL, /* key file */
NULL, /* ca info */
NULL, /* ca file */
0, /* verify peer */
0, /* verify host */
- "will", /* Username */
- "pill", /* Password */
- "", /* Username2 */
- "", /* Password2 */
+ "sample1", /* Username */
+ "sample1", /* Password */
+ "sample1", /* Username2 */
+ "sample1", /* Password2 */
NULL, /* Source ip */
NULL, /* Source ip2 */
EVEL_SOURCE_VIRTUAL_MACHINE, /* Source type */