Re: [Nagios-devel] Nagios dashboard...

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Nagios dashboard...

Post by Guest »

--=-Av9Np5FIYsinSjGMzK11
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Andreas,
>=20
> >=20
> > I've given your patch a try - it applies and complies just fine.=20
> But
> > there is a reference to a "status2.cgi" and a "dash-images"
> directory
> > (?) not included in the patch - could you point me where to find
> them
> > ?

I've created a new patch file. It builds and runs on G4 Apple
Powerbook Mac OS X 10.5.8. Can you give it a try?

HTH, cu l8r, Edgar.



--=-Av9Np5FIYsinSjGMzK11
Content-Type: text/x-patch; charset=us-ascii; name=nagios-dashboard-3.0.6.patch
Content-Disposition: attachment; filename=nagios-dashboard-3.0.6.patch
Content-Transfer-Encoding: quoted-printable

diff -Naur nagios-3.0.6.old/cgi/Makefile.in nagios-3.0.6/cgi/Makefile.in
--- nagios-3.0.6.old/cgi/Makefile.in 2008-11-02 18:32:03.000000000 +0100
+++ nagios-3.0.6/cgi/Makefile.in 2009-08-15 11:43:59.000000000 +0200
@@ -24,6 +24,8 @@
=20
CGIEXTRAS=3D@CGIEXTRAS@
=20
+GDLIBS=3D-lgd
+
CP=3D@CP@
CC=3D@CC@
CFLAGS=3D@CFLAGS@ @DEFS@ @GLIB_INCLUDE@ -DNSCGI
@@ -155,7 +157,7 @@
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ showlog.c $(CGILIBS) $(LIBS)
=20
status.cgi: status.c $(CGIDEPS) $(CDATADEPS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ status.c $(CGILIBS) $(CDATALIBS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ status.c $(CGILIBS) $(CDATALIBS) $(LIBS)=
$(GDLIBS)
=20
statuswml.cgi: statuswml.c $(CGIDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ statuswml.c $(CGILIBS) $(LIBS)
diff -Naur nagios-3.0.6.old/cgi/status.c nagios-3.0.6/cgi/status.c
--- nagios-3.0.6.old/cgi/status.c 2008-11-30 18:52:34.000000000 +0100
+++ nagios-3.0.6/cgi/status.c 2009-08-15 21:00:24.000000000 +0200
@@ -21,6 +21,21 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*************************************************************************=
/
=20
+
+/*
+ * Dashboard entries for nagios 3.0.6
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include "../include/locations.h"
+/*
+ * End dashboard
+ */
+
#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
@@ -32,6 +47,17 @@
#include "../include/getcgi.h"
#include "../include/cgiauth.h"
=20
+/*
+ * Dashboard entries for nagios 3.0.6
+ */
+#define STATUS2_CGI "status2.cgi"
+char *full_img_path =3D NULL;
+#define HTML_IMG_PATH "/nagios/dash-images"
+#define IMGSIZE 100
+/*
+ * End dashboard
+ */
+
extern int refresh_rate;
extern time_t program_start;
=20
@@ -78,6 +104,17 @@
#define STYLE_GRID 3
#define STYLE_HOST_DETAIL 4
=20
+/*
+ * Dashboard entries for nagios 3.0.6
+ */
+#define STYLE_DASHBOARD 5
+
+#define NR_ARG_HOSTS 4
+#define NR_ARG_SERVICES 5
+/*
+ * End dashboard
+ */
+
/* HOSTSORT structure */
typedef struct hostsort_struct{
hoststatus *hststatus;
@@ -123,6 +160,25 @@
void show_hostgroup_grids(void);
void show_hostgroup_grid(hostgroup *);
=20
+
+/*
+ * Dashboard entries for nagios 3.0.6
+ */
+void show_servicegroup_chart(servicegroup *);
+void show_hostgroup_chart(hostgroup *);
+void show_servicegroup_dashboard(void);
+void show_hostgroup_dashboard(void);
+void get_servicegroup_host_totals_summary(servicegroup *temp_servicegroup,=
int *r_up, int *r_down, int *r_unreachable, int *r_pending);
+void get_servicegroup_service_totals_summary(servicegroup *temp_servicegro=
up, int *r_ok, int *r_warning, int *r_unknown, int *r_critical, int *r_pend=
ing);
+void get_hostgroup_service_totals_summary(hostgroup *temp_hostgroup, int *=
r_ok, int *r_warning, int *r_unknown, int *r_critical, int *r_pending);
+void get_hostgroup_host_totals_summary(hostgroup *temp_hostgroup, int *r_u=
p, int *r_down, int *r_unreachable, int *r_pending);
+char *mkchart(char *type, int nr, ...);
+char *uniquepngfile (char *type);
+int getlargest (int i1, int i2, int i3, int i4, int i5);
+/*
+ * End dashboard
+ */
+
void show_filters(void);
=20
int passes_host_properties_filter(hoststatus *);
@@ -327,33 +383,33 @@
e

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked